﻿/*****************处理（读）（写）权限********************/
//writeOrRead();
function writeOrRead(){
var framelength=window.parent.window.frames.length;

if(framelength<=1)//主页
return;

var objectframe=window.parent.window.frames[framelength-1];//获得最后一个 也就是当前打开的那个
//当前菜单功能模块ID
var ignmkdm=(objectframe.parent.window.document.getElementsByTagName("iframe")[framelength-1].getAttribute("specialdm"));
addListener(window, 'load', operatefunction); 
}
//添加事件

function addListener (element, event, fn) {
if (window.attachEvent) {
element.attachEvent('on' + event, fn); 
} else {
element.addEventListener(event, fn, false); 
}
}
function showDivWindow(url,width,height,title){
	 tipsWindown(title,"id:text",width,height,"true","","true","id",url,height,'no');
}
function operatefunction(){
//处理DIV
var alldiv=window.document.getElementsByTagName("div");//获得全部DIV
for(g=0;g<alldiv.length;g++)
{
  var perdiv=alldiv[g];
  if(perdiv.getAttribute("classname")=="buttonbox")//循环判断每个DIV 找到功能区
  {

  try{
    var manarea=perdiv.getElementsByTagName("ul");
    //perdiv.innerText="";//删除功能菜单
    }catch(e){}
    
    break;
  }
}
}
/*************************************/


var sort_col = null;//排序列（对象）
var curr_row = null;//选中行（对象）
var cur_bgc = "#F8E2C2";//选中行背景（字符串）
var cookieValue = "skin1";//皮肤目录（字符串）
var maxRowToSort = 200;//最大排序行（数字）
var splitSignOne = "!!SplitSignOne!!";
var splitSignTwo = "!!SplitSignTwo!!";
var lastScrollY = 0;
var flyLayerHeight = 36;
var curr_row = null;
var obj_bgc = "#EEEEEE";
var $;
var P$;

var ie = document.all ? 1 : 0;
var ns = document.layers ? 1 : 0;

/**JavaScript版本检测*/
if(ie){
	var ver = Number(ScriptEngineMajorVersion() + "." + ScriptEngineMinorVersion());
	if(ver < 5.5){
		location.href = "errMsg.do?errMsg=?????÷°?±?????,????????·???";
	}
}
/**定义公用方法:查找对象(ID)*/
if (!$ && document.getElementById) {
  $ = function() {
    var elements = new Array();
    for (var i = 0; i < arguments.length; i++) {
      var element = arguments[i];
      if (typeof element == 'string') {
        element = document.getElementById(element);
      }
      if (arguments.length == 1) {
        return element;
      }
      elements.push(element);
    }
    return elements;
  };
} else if (!$ && document.all) {
  $ = function() {
    var elements = new Array();
    for (var i = 0; i < arguments.length; i++) {
      var element = arguments[i];
      if (typeof element == 'string') {
        element = document.all[element];
      }
      if (arguments.length == 1) {
        return element;
      }
      elements.push(element);
    }
    return elements;
  };
}

if (!P$ && document.getElementById) {
  P$ = function() {
    var elements = new Array();
    for (var i = 0; i < arguments.length; i++) {
      var element = arguments[i];
      if (typeof element == 'string') {
        element = window.dialogArguments.document.getElementById(element);
      }
      if (arguments.length == 1) {
        return element;
      }
      elements.push(element);
    }
    return elements;
  };
} else if (!P$ && document.all) {
  P$ = function() {
    var elements = new Array();
    for (var i = 0; i < arguments.length; i++) {
      var element = arguments[i];
      if (typeof element == 'string') {
        element = window.dialogArguments.document.all[element];
      }
      if (arguments.length == 1) {
        return element;
      }
      elements.push(element);
    }
    return elements;
  };
}

/**定义页面初始化公用方法*/
function initCSS() {
	if (window.dialogArguments){
		document.title = document.title + "------(ESC关闭窗口)";
	}
	var search = "style=";
	if (document.cookie.length > 0) {
		offset = document.cookie.indexOf(search);
		if (offset != -1) {
			offset += search.length;
			end = document.cookie.indexOf(";", offset);
			if (end == -1) {
				end = document.cookie.length;
			}
			cookieValue = unescape(document.cookie.substring(offset, end));
		}
	}	
	//window.setInterval("window.status='数字化校园信息平台'",3000);
	//var tmp = $("csss").href;
	//tmp = tmp.substring(tmp.indexOf("style"),tmp.length);
	//$("csss").href = cookieValue + "/" + tmp;
}
initCSS();
/**设置网页打印的页眉页脚为空 */
function PageSetup(m_Left,m_Right,m_Top,m_Bottom,t_Header,t_Footer){ 
	var chg = 0.03937;
	var l = (m_Left == null ? 0 : m_Left*chg);
	var r = (m_Right == null ? 0 : m_Right*chg);
	var t = (m_Top == null ? 0 : m_Top*chg);
	var b = (m_Bottom == null ? 0 : m_Bottom*chg);
	var msg = "";
	try{
		var HKEY_Root;
		var HKEY_Path;
		var HKEY_Key; 
		HKEY_Root="HKEY_CURRENT_USER"; 
		HKEY_Path="\\Software\\Microsoft\\Internet Explorer\\PageSetup\\"; 
		var Wsh=new ActiveXObject("WScript.Shell"); 
	 	HKEY_Key="margin_left"; 
	 	Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,l); 
	 	HKEY_Key="margin_right"; 
	 	Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,r); 
	 	HKEY_Key="margin_top"; 
	 	Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,t); 
	 	HKEY_Key="margin_bottom"; 
	 	Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,b); 
	 	HKEY_Key="header"; 
	 	Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,t_Header); 
	 	HKEY_Key="footer"; 
	 	Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,t_Footer); 
	}catch(e){
		msg = "由于您的计算机安全级别设置得太高，系统无法修改本次打印所需的设置。<br>请手动设置。";
		alert(msg);
	} 
} 
/**设置网页打印的页眉页脚为默认值 */
function  PageSetup_Default() {   
	try { 
		var HKEY_Root;
		var HKEY_Path;
		var HKEY_Key; 
		HKEY_Root="HKEY_CURRENT_USER"; 
		HKEY_Path="\\Software\\Microsoft\\Internet Explorer\\PageSetup\\"; 
 		var Wsh=new ActiveXObject("WScript.Shell"); 
 		HKEY_Key="header"; 
 		Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,"&w&b页码,&p/&P"); 
 		HKEY_Key="footer"; 
 		Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,"&u&b&d"); 
	} catch(e){
		
	} 
} 

/**禁用选择、复制以及右键*/
/*
document.onselectstart = function(){
	return false;
};
document.ondragstart = function(){
	return false;
};
document.onbeforecopy = function(){
	return false;
}; 
document.oncopy = function(){
	document.selection.empty();
};
document.onselect = function(){
	document.selection.empty();
};
document.oncontextmenu = function(){
	return false;
};
*/

document.onkeypress = function () {
	if (event.keyCode == 27) {
		if (window.dialogArguments) {
			window.close();
			return false;
		}
		if($("menuCont")){
			$("menuCont").style.display = $("menuCont").style.display == "none"?"":"none";
			return false;
		}
		if(window.parent.$("menuCont")){
			window.parent.$("menuCont").style.display = window.parent.$("menuCont").style.display == "none"?"":"none";
			return false;
		}
	}
};
/**定义公用方法:关闭窗口*/
function Close() {
	var ua = navigator.userAgent;
	var ie = navigator.appName == "Microsoft Internet Explorer" ? true : false;
	if (ie) {
		var IEversion = parseFloat(ua.substring(ua.indexOf("MSIE ") + 5, ua.indexOf(";", ua.indexOf("MSIE "))));
		if (IEversion < 5.5) {
			var str = "<object id=noTipClose classid=\"clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11\">";
			str += "<param name=\"Command\" value=\"Close\"></object>";
			document.body.insertAdjacentHTML("beforeEnd", str);
			document.all.noTipClose.Click();
		} else {
			window.opener = null;
			window.close();
		}
	} else {
		window.close();
	}
}
/**定义公用方法:排序*/
function judge_CN(char1, char2, mode) {
	var charPYStr = "啊阿埃挨哎唉哀皑癌蔼矮艾碍爱隘鞍氨安俺按暗岸胺案肮昂盎凹敖熬翱袄傲奥懊澳芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸白柏百摆佰败拜稗斑班搬扳般颁板版扮拌伴瓣半办绊邦帮梆榜膀绑棒磅蚌镑傍谤苞胞包褒剥薄雹保堡饱宝抱报暴豹鲍爆杯碑悲卑北辈背贝钡倍狈备惫焙被奔苯本笨崩绷甭泵蹦迸逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛鞭边编贬扁便变卞辨辩辫遍标彪膘表鳖憋别瘪彬斌濒滨宾摈兵冰柄丙秉饼炳病并玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳捕卜哺补埠不布步簿部怖擦猜裁材才财睬踩采彩菜蔡餐参蚕残惭惨灿苍舱仓沧藏操糙槽曹草厕策侧册测层蹭插叉茬茶查碴搽察岔差诧拆柴豺搀掺蝉馋谗缠铲产阐颤昌猖场尝常长偿肠厂敞畅唱倡超抄钞朝嘲潮巢吵炒车扯撤掣彻澈郴臣辰尘晨忱沉陈趁衬撑称城橙成呈乘程惩澄诚承逞骋秤吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽充冲虫崇宠抽酬畴踌稠愁筹仇绸瞅丑臭初出橱厨躇锄雏滁除楚础储矗搐触处揣川穿椽传船喘串疮窗幢床闯创吹炊捶锤垂春椿醇唇淳纯蠢戳绰疵茨磁雌辞慈瓷词此刺赐次聪葱囱匆从丛凑粗醋簇促蹿篡窜摧崔催脆瘁粹淬翠村存寸磋撮搓措挫错搭达答瘩打大呆歹傣戴带殆代贷袋待逮怠耽担丹单郸掸胆旦氮但惮淡诞弹蛋当挡党荡档刀捣蹈倒岛祷导到稻悼道盗德得的蹬灯登等瞪凳邓堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔颠掂滇碘点典靛垫电佃甸店惦奠淀殿碉叼雕凋刁掉吊钓调跌爹碟蝶迭谍叠丁盯叮钉顶鼎锭定订丢东冬董懂动栋侗恫冻洞兜抖斗陡豆逗痘都督毒犊独读堵睹赌杜镀肚度渡妒端短锻段断缎堆兑队对墩吨蹲敦顿囤钝盾遁掇哆多夺垛躲朵跺舵剁惰堕蛾峨鹅俄额讹娥恶厄扼遏鄂饿恩而儿耳尔饵洱二贰发罚筏伐乏阀法珐藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛坊芳方肪房防妨仿访纺放菲非啡飞肥匪诽吠肺废沸费芬酚吩氛分纷坟焚汾粉奋份忿愤粪丰封枫蜂峰锋风疯烽逢冯缝讽奉凤佛否夫敷肤孵扶拂辐幅氟符伏俘服浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐噶嘎该改概钙盖溉干甘杆柑竿肝赶感秆敢赣冈刚钢缸肛纲岗港杠篙皋高膏羔糕搞镐稿告哥歌搁戈鸽胳疙割革葛格蛤阁隔铬个各给根跟耕更庚羹埂耿梗工攻功恭龚供躬公宫弓巩汞拱贡共钩勾沟苟狗垢构购够辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇刮瓜剐寡挂褂乖拐怪棺关官冠观管馆罐惯灌贯光广逛瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽辊滚棍锅郭国果裹过哈骸孩海氦亥害骇酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉夯杭航壕嚎豪毫郝好耗号浩呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺嘿黑痕很狠恨哼亨横衡恒轰哄烘虹鸿洪宏弘红喉侯猴吼厚候后呼乎忽瑚壶葫胡蝴狐糊湖弧虎唬护互沪户花哗华猾滑画划化话槐徊怀淮坏欢环桓还缓换患唤痪豢焕涣宦幻荒慌黄磺蝗簧皇凰惶煌晃幌恍谎灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘荤昏婚魂浑混豁活伙火获或惑霍货祸击圾基机畸稽积箕肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际妓继纪嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件健舰剑饯渐溅涧建僵姜将浆江疆蒋桨奖讲匠酱降蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫窖揭接皆秸街阶截劫节茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净炯窘揪究纠玖韭久灸九酒厩救旧臼舅咎就疚鞠拘狙疽居驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧捐鹃娟倦眷卷绢撅攫抉掘倔爵桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸尽劲荆兢觉决诀绝均菌钧军君峻俊竣浚郡骏喀咖卡咯开揩楷凯慨刊堪勘坎砍看康慷糠扛抗亢炕考拷烤靠坷苛柯棵磕颗科壳咳可渴克刻客课肯啃垦恳坑吭空恐孔控抠口扣寇枯哭窟苦酷库裤夸垮挎跨胯块筷侩快宽款匡筐狂框矿眶旷况亏盔岿窥葵奎魁傀馈愧溃坤昆捆困括扩廓阔垃拉喇蜡腊辣啦莱来赖蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥琅榔狼廊郎朗浪捞劳牢老佬姥酪烙涝勒乐雷镭蕾磊累儡垒擂肋类泪棱楞冷厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐痢立粒沥隶力璃哩俩联莲连镰廉怜涟帘敛脸链恋炼练粮凉梁粱良两辆量晾亮谅撩聊僚疗燎寥辽潦了撂镣廖料列裂烈劣猎琳林磷霖临邻鳞淋凛赁吝拎玲菱零龄铃伶羚凌灵陵岭领另令溜琉榴硫馏留刘瘤流柳六龙聋咙笼窿隆垄拢陇楼娄搂篓漏陋芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮驴吕铝侣旅履屡缕虑氯律率滤绿峦挛孪滦卵乱掠略抡轮伦仑沦纶论萝螺罗逻锣箩骡裸落洛骆络妈麻玛码蚂马骂嘛吗埋买麦卖迈脉瞒馒蛮满蔓曼慢漫谩芒茫盲氓忙莽猫茅锚毛矛铆卯茂冒帽貌贸么玫枚梅酶霉煤没眉媒镁每美昧寐妹媚门闷们萌蒙檬盟锰猛梦孟眯醚靡糜迷谜弥米秘觅泌蜜密幂棉眠绵冕免勉娩缅面苗描瞄藐秒渺庙妙蔑灭民抿皿敏悯闽明螟鸣铭名命谬摸摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谋牟某拇牡亩姆母墓暮幕募慕木目睦牧穆拿哪呐钠那娜纳氖乃奶耐奈南男难囊挠脑恼闹淖呢馁内嫩能妮霓倪泥尼拟你匿腻逆溺蔫拈年碾撵捻念娘酿鸟尿捏聂孽啮镊镍涅您柠狞凝宁拧泞牛扭钮纽脓浓农弄奴努怒女暖虐疟挪懦糯诺哦欧鸥殴藕呕偶沤啪趴爬帕怕琶拍排牌徘湃派攀潘盘磐盼畔判叛乓庞旁耪胖抛咆刨炮袍跑泡呸胚培裴赔陪配佩沛喷盆砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯砒霹批披劈琵毗啤脾疲皮匹痞僻屁譬篇偏片骗飘漂瓢票撇瞥拼频贫品聘乒坪苹萍平凭瓶评屏坡泼颇婆破魄迫粕剖扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫掐洽牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉枪呛腔羌墙蔷强抢橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍切茄且怯窃钦侵亲秦琴勤芹擒禽寝沁青轻氢倾卿清擎晴氰情顷请庆琼穷秋丘邱球求囚酋泅趋区蛆曲躯屈驱渠取娶龋趣去圈颧权醛泉全痊拳犬券劝缺炔瘸却鹊榷确雀裙群然燃冉染瓤壤攘嚷让饶扰绕惹热壬仁人忍韧任认刃妊纫扔仍日戎茸蓉荣融熔溶容绒冗揉柔肉茹蠕儒孺如辱乳汝入褥软阮蕊瑞锐闰润若弱撒洒萨腮鳃塞赛三叁伞散桑嗓丧搔骚扫嫂瑟色涩森僧莎砂杀刹沙纱傻啥煞筛晒珊苫杉山删煽衫闪陕擅赡膳善汕扇缮墒伤商赏晌上尚裳梢捎稍烧芍勺韶少哨邵绍奢赊蛇舌舍赦摄射慑涉社设砷申呻伸身深娠绅神沈审婶甚肾慎渗声生甥牲升绳省盛剩胜圣师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试收手首守寿授售受瘦兽蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱恕刷耍摔衰甩帅栓拴霜双爽谁水睡税吮瞬顺舜说硕朔烁斯撕嘶思私司丝死肆寺嗣四伺似饲巳松耸怂颂送宋讼诵搜艘擞嗽苏酥俗素速粟僳塑溯宿诉肃酸蒜算虽隋随绥髓碎岁穗遂隧祟孙损笋蓑梭唆缩琐索锁所塌他它她塔獭挞蹋踏胎苔抬台泰酞太态汰坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭汤塘搪堂棠膛唐糖倘躺淌趟烫掏涛滔绦萄桃逃淘陶讨套特藤腾疼誊梯剔踢锑提题蹄啼体替嚏惕涕剃屉天添填田甜恬舔腆挑条迢眺跳贴铁帖厅听烃汀廷停亭庭挺艇通桐酮瞳同铜彤童桶捅筒统痛偷投头透凸秃突图徒途涂屠土吐兔湍团推颓腿蜕褪退吞屯臀拖托脱鸵陀驮驼椭妥拓唾挖哇蛙洼娃瓦袜歪外豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕汪王亡枉网往旺望忘妄威巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫瘟温蚊文闻纹吻稳紊问嗡翁瓮挝蜗涡窝我斡卧握沃巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误昔熙析西硒矽晰嘻吸锡牺稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细瞎虾匣霞辖暇峡侠狭下厦夏吓掀锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象萧硝霄削哮嚣销消宵淆晓小孝校肖啸笑效楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑薪芯锌欣辛新忻心信衅星腥猩惺兴刑型形邢行醒幸杏性姓兄凶胸匈汹雄熊休修羞朽嗅锈秀袖绣墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续轩喧宣悬旋玄选癣眩绚靴薛学穴雪血勋熏循旬询寻驯巡殉汛训讯逊迅压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾邀腰妖瑶摇尧遥窑谣姚咬舀药要耀椰噎耶爷野冶也页掖业叶曳腋夜液一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎茵荫因殷音阴姻吟银淫寅饮尹引隐印英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映哟拥佣臃痈庸雍踊蛹咏泳涌永恿勇用幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉浴寓裕预豫驭鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院曰约越跃钥岳粤月悦阅耘云郧匀陨允运蕴酝晕韵孕匝砸杂栽哉灾宰载再在咱攒暂赞赃脏葬遭糟凿藻枣早澡蚤躁噪造皂灶燥责择则泽贼怎增憎曾赠扎喳渣札轧铡闸眨栅榨咋乍炸诈摘斋宅窄债寨瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽樟章彰漳张掌涨杖丈帐账仗胀瘴障招昭找沼赵照罩兆肇召遮折哲蛰辙者锗蔗这浙珍斟真甄砧臻贞针侦枕疹诊震振镇阵蒸挣睁征狰争怔整拯正政帧症郑证芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒中盅忠钟衷终种肿重仲众舟周州洲诌粥轴肘帚咒皱宙昼骤珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑住注祝驻抓爪拽专砖转撰赚篆桩庄装妆撞壮状椎锥追赘坠缀谆准捉拙卓桌琢茁酌啄着灼浊兹咨资姿滋淄孜紫仔籽滓子自渍字鬃棕踪宗综总纵邹走奏揍租足卒族祖诅阻组钻纂嘴醉最罪尊遵昨左佐柞做作坐座";
	var charSet = charPYStr;
	for (var n = 0; n < (char1.length > char2.length ? char1.length : char2.length); n++) {
		if (char1.charAt(n) != char2.charAt(n)) {
			if (mode) {
				return (charSet.indexOf(char1.charAt(n)) > charSet.indexOf(char2.charAt(n)) ? 1 : -1);
			} else {
				return (charSet.indexOf(char1.charAt(n)) < charSet.indexOf(char2.charAt(n)) ? 1 : -1);
			}
			break;
		}
	}
	return (0);
}
function tableSort(the_td) {
try{
	arrowUp = document.createElement("SPAN");
	arrowUp.innerHTML = "5";
	arrowUp.style.cssText = " PADDING-RIGHT: 0px; MARGIN-TOP: -3px; PADDING-LEFT: 0px;  FONT-SIZE: 10px; MARGIN-BOTTOM: 2px; PADDING-BOTTOM: 2px; OVERFLOW: hidden; WIDTH: 10px; COLOR: blue; PADDING-TOP: 0px; FONT-FAMILY: webdings; HEIGHT: 11px";
	arrowDown = document.createElement("SPAN");
	arrowDown.innerHTML = "6";
	arrowDown.style.cssText = " PADDING-RIGHT: 0px; MARGIN-TOP: -3px; PADDING-LEFT: 0px; FONT-SIZE: 10px; MARGIN-BOTTOM: 2px; PADDING-BOTTOM: 2px; OVERFLOW: hidden; WIDTH: 10px; COLOR: blue; PADDING-TOP: 0px; FONT-FAMILY: webdings; HEIGHT: 11px";
	the_td.mode = !the_td.mode;
	var cur_col = the_td.cellIndex;   
	var the_table = getPapaElement(the_td, "table");
	if (the_table.rows.length > maxRowToSort) {
		if (!confirm("当前表的行数超过" + maxRowToSort + "行,排序将耗费比较长的时间,确定要排序吗?")) {
			return false;
		}
	}
	if (sort_col != null) {
		with (the_table.rows[0].cells[sort_col]) {
			removeChild(lastChild);
		}			
	}
    
	if(the_table.rows[1].cells[1]){		
		with (the_table.rows[0].cells[cur_col]) {
			appendChild(the_td.mode ? arrowUp : arrowDown);
		}
		sort_tab(the_table, cur_col, the_td.mode);
		sort_col = cur_col;
	}		
	}catch(e){} 
}
function sort_tab(the_tab, col, mode) {
	var tab_arr = new Array();
	var i;
	var start = new Date;
	var indexSum = 0;
	var tempSum = 0;
	var tempText = "";
	var checkL=0;
	if(the_tab.rows[0].cells[0].getElementsByTagName("input")[0].type =="checkbox") {
		checkL=1;
	}
	for(k = 0;k < the_tab.rows[0].cells.length;k++) {
		tempSum = 0;
		for(e = 1;e < the_tab.rows.length;e++) {
			tempText = the_tab.rows[e].cells[k].innerText;
			tempText = replaceChar(tempText," ","");
			if(tempText=="") {
				continue;
			} else {
				tempSum ++;
			}
		}
		if(tempSum > indexSum) {
			indexSum = tempSum;
		}
	}
	
	//排序
	var l = the_tab.rows.length;
	if (tempSum == 0) {
		for (var x = (indexSum + 1); x < l; x = x+1) {
			the_tab.deleteRow(indexSum + 1);		
		}
	} else if (indexSum != (l-1)) {
		for (var x = (tempSum + 1); x < l; x = x+1) {
			the_tab.deleteRow(tempSum + 1);		
		}
	}
	//排序
	
	for (i = 1; i < the_tab.rows.length; i++) {
		//var tempText2 = the_tab.rows[i].cells[col].innerText;
		//tempText2 = replaceChar(tempText2," ","");
		//if(tempText2 != "") {
			tab_arr.push(new Array(the_tab.rows[i].cells[col].innerText.toLowerCase(), the_tab.rows[i]));
		//}
	}
	tab_arr.sort(SortArr(mode));
	/*if(tab_arr.length < indexSum) {
		for(d = indexSum - tab_arr.length; d >= 1;d--) {
			tab_arr.push(new Array(" ", the_tab.lastChild));
		}
	}*/
	/*if(mode) {
		for (i = tab_arr.length - 1; i >= 0; i--) {
			the_tab.lastChild.appendChild(tab_arr[i][1]);
		}
	} else {*/
		for (i = 0; i < tab_arr.length; i++) {
			the_tab.lastChild.appendChild(tab_arr[i][1]);
		}
		
		//排序
		if (tempSum == 0) {
			for(var y = (indexSum + 1); y < l; y = y+1) {
				var tr=document.createElement("tr");
				for(var z = 0; z < the_tab.rows[0].cells.length; z = z+1) {
					var td=document.createElement("td");
					td.align="center";
					if(checkL > 0 && z == 0) {
						td.innerHTML="<input type=\"checkbox\" disabled=true>";
					} else {
						td.innerHTML="&nbsp;&nbsp;";
					}
					tr.appendChild(td);
				}
			the_tab.lastChild.appendChild(tr);
			}
		} else if (indexSum != (l-1)) {
			for(var y = (tempSum + 1); y < l; y = y+1) {
				var tr=document.createElement("tr");
				for(var z = 0; z < the_tab.rows[0].cells.length; z = z+1) {
					var td=document.createElement("td");
					td.align="center";
					if(checkL > 0 && z==0) {
						td.innerHTML="<input type=\"checkbox\" disabled=true>";
					} else {
						td.innerHTML="&nbsp;&nbsp;";
					}
					tr.appendChild(td);
				}
			the_tab.lastChild.appendChild(tr);
			}
		}
		//排序
		
	//}
}
function SortArr(mode) {
		return function (arr1, arr2) {
			var flag;
			var a, b;
			a = arr1[0];
			b = arr2[0];
			if (/^(\+|-)?\d+($|\.\d+$)/.test(a) && /^(\+|-)?\d+($|\.\d+$)/.test(b)) {
				a = eval(a);
				b = eval(b);
				flag = mode ? (a > b ? 1 : (a < b ? -1 : 0)) : (a < b ? 1 : (a > b ? -1 : 0));
			} else {
				a = replaceChar(a.toString()," ","");
				b = replaceChar(b.toString()," ","");
				if (a.charCodeAt(0) >= 19968 && b.charCodeAt(0) >= 19968) {
					flag = judge_CN(a, b, mode);
				} else {
					flag = mode ? (a > b ? 1 : (a < b ? -1 : 0)) : (a < b ? 1 : (a > b ? -1 : 0));
				}
			}
			return flag;
	};
}
/**定义公用方法:获取父对象*/
function getPapaElement(the_ele, the_tag) {
	the_tag = the_tag.toLowerCase();
	if (the_ele.tagName.toLowerCase() == the_tag) {
		return the_ele;
	}
	while (the_ele = the_ele.offsetParent) {
		if (the_ele.tagName.toLowerCase() == the_tag) {
			return the_ele;
		}
	}
	return (null);
}
/**定义公用方法:行点击*/
function rowOnClick(objTr) {
	if (curr_row != null && curr_row.tagName.toLowerCase() == "tr") {
		curr_row.style.backgroundColor = obj_bgc;
	}
	curr_row = objTr;	
	obj_bgc = curr_row.style.backgroundColor;
	curr_row.style.backgroundColor = cur_bgc;
	try{
		var obj = event.srcElement? event.srcElement : event.target;
		var chkBox = curr_row.getElementsByTagName("input");
		if(!$("checkBoxStatus") || ($("checkBoxStatus") && $("checkBoxStatus").value!="no")) {
			for(var i = 0; i < chkBox.length; i++){
				if(obj.tagName=="INPUT" && chkBox[i].type=="checkbox"){//事件源
					chkBox[i].checked = !chkBox[i].checked;
				}
			}
		}
	}catch(e){
		
	}
}
/**定义公用方法:替换字符串*/
function replaceChar(conversionString, inChar, outChar) {
	var convertedString = conversionString.split(inChar);
	convertedString = convertedString.join(outChar);
	return convertedString;
}
/**判断浏览器类型及版本*/
function browserinfo(){
        var Browser_Name=navigator.appName;
        var Browser_Version=parseFloat(navigator.appVersion);
        var Browser_Agent=navigator.userAgent;
        
        var Actual_Version,Actual_Name;
        
        var is_IE=(Browser_Name=="Microsoft Internet Explorer");
        var is_NN=(Browser_Name=="Netscape");
        
        if(is_NN){
            if(Browser_Version>=5.0){
                var Split_Sign=Browser_Agent.lastIndexOf("/");
                var Version=Browser_Agent.indexOf(" ",Split_Sign);
                var Bname=Browser_Agent.lastIndexOf(" ",Split_Sign);

                Actual_Version=Browser_Agent.substring(Split_Sign+1,Version);
                Actual_Name=Browser_Agent.substring(Bname+1,Split_Sign);
            }
            else{
                Actual_Version=Browser_Version;
                Actual_Name=Browser_Name;
            }
        }
        else if(is_IE){
            var Version_Start=Browser_Agent.indexOf("MSIE");
            var Version_End=Browser_Agent.indexOf(";",Version_Start);
            Actual_Version=Browser_Agent.substring(Version_Start+5,Version_End)
            Actual_Name=Browser_Name;
            
            if(Browser_Agent.indexOf("Maxthon")!=-1){
                Actual_Name+="(Maxthon)";
            }
            else if(Browser_Agent.indexOf("Opera")!=-1){
                Actual_Name="Opera";
                var tempstart=Browser_Agent.indexOf("Opera");
                var tempend=Browser_Agent.length;
                Actual_Version=Browser_Agent.substring(tempstart+6,tempend)
            }
        }
        else{
            Actual_Name="Unknown Navigator"
            Actual_Version="Unknown Version"
        }

        navigator.Actual_Name=Actual_Name;
        navigator.Actual_Version=Actual_Version;
        
        this.Name=Actual_Name;
        this.Version=Actual_Version;
    }
/**定义公用方法:弹出无模式对话框*/
 
function showTopWin(url, w, h, scro) {
	var info = "";
	//browserinfo();
	if(scro!=null){	
		if(navigator.Actual_Version == "6.0") {
			info = "status:0;dialogWidth:" + (w + 50) + "px;dialogHeight:" + (h + 50) + "px;help:no;scroll:yes;resizable=1;";
		} else {
			info = "status:0;dialogWidth:" + w + "px;dialogHeight:" + h + "px;help:no;scroll:yes;resizable=1;";
		}
	}
	else{
		if(navigator.Actual_Version == "6.0") {
			info = "status:0;dialogWidth:" + (w + 50) + "px;dialogHeight:" + (h + 50) + "px;help:no;scroll:no;resizable=1;";
		} else {
			info = "status:0;dialogWidth:" + w + "px;dialogHeight:" + h + "px;help:no;scroll:no;resizable=1;";
		}
	}
	/*if(url.indexOf("?") != "-1") {
		url += "&"+Math.random();
	}
	else {
		url += "?"+Math.random();
	}*/
	showModalDialog(url, window, info);
}
/**定义公用方法:弹出新windows窗口*/
 
function showWindowWin(url,width,height) {
	if(url.indexOf("?") != "-1") {
		url += "&"+Math.random();
	}
	else {
		url += "?"+Math.random();
	}
	vhei=screen.height - 60;
	vwid=screen.width -10;	
	var prop= "";
	if(!width&&height)
	{
		prop="toolbar=no,location=no,directories=no,resizable=yes,status=no,menubar=no,scrollbars=yes,left=0,top=0,height="+vhei+",width="+vwid;
	}
	else if(!height)
	{
		prop="toolbar=no,location=no,directories=no,resizable=yes,status=no,menubar=no,scrollbars=yes,left=0,top=0,height="+vhei+",width="+width;
	}
	else if(!width)
	{
		prop="toolbar=no,location=no,directories=no,resizable=yes,status=no,menubar=no,scrollbars=yes,left=0,top=0,height="+height+",width="+vwid;
	}
	else
	{
		prop="toolbar=no,location=no,directories=no,resizable=yes,status=no,menubar=no,scrollbars=yes,left=0,top=0,height="+height+",width="+width;
	}
	
	window.open(url,"",prop);
}
/**定义公用方法:表单提交*/
function refreshForm(url,tarG) {
	
	var tar = document.forms[0].target;
	document.forms[0].action = url;
	if(tarG != null){
		document.forms[0].target = tarG;
	}
	document.forms[0].submit();
	document.forms[0].target = tar;
}
/**定义公用方法:检测子窗口*/
function checkWinType() {
	if (window.dialogArguments == null || window.parent == null) {
		alert("非法访问，窗口即将关闭！");
		Close();
		return false;
	}
}
/**定义公用方法:数字格式及边界判断*/
function numFormatChk(obj,msg,minV,maxV,autoFill) {	
	if(obj.value == "" && autoFill == null)obj.value = "0";
	var reg1 = /^\d+[.]?\d+$/g;
	if(obj.value.length == 1){
		reg1 = /^\d+$/g;
	}
	var str = obj.value;
	var r1 = str.match(reg1);
	if(r1 == null){
		alert("您输入的" + msg + "不合法，请重新输入！",false,function(){
			obj.select();
			obj.focus();
		});
		return false;
	}
	var tmpV = parseFloat(str);
	if(minV != null && tmpV < minV){
		alert("您输入的" + msg + "值过小（最小为：" + minV + "），请重新输入！",false,function(){
			obj.select();
			obj.focus();
		});
		return false;
	}
	if(maxV != null && tmpV > maxV){
		alert("您输入的" + msg + "值过大（最大为：" + maxV + "），请重新输入！",false,function(){
			obj.select();
			obj.focus();
		});
		return false;
	}
	return true;
}
/**定义公用方法:检验姓名*/
function chkName(obj,msg) {
	if(obj.value == ""){
		alert("请输入" + msg + "！",false,function(){
			obj.select();
			obj.focus();
		});
		return false;
	}
	var reg1 = /^([\u4e00-\u9fa5]+)(·|\s)?([\u4e00-\u9fa5]+)$/g;
	var str = obj.value;
	var r1 = str.match(reg1);
	if(r1 == null){
		alert("您输入的" + msg + "不合法，请重新输入！",false,function(){
			obj.select();
			obj.focus();
		});
		return false;
	}
	return true;
}
function chkName2(obj) {
	var reg1 = /^([\u4e00-\u9fa5]+)(·|\s)?([\u4e00-\u9fa5]+)$/g;
	var str = obj.value;
	var r1 = str.match(reg1);
	if(r1 == null){
		return false;
	}
	return true;
}
/**定义公用方法:检验身份证号码*/
function chkSfzh(obj) {
	var sfzh = obj.value;
	var OldID;
	if(sfzh.length == 15){
		OldID = sfzh;
		return true;
	}else if(sfzh.length == 18){
		OldID = sfzh.substring(0, 6) + sfzh.substring(8,sfzh.length-1);
	}else{
		alert("请输入正确的身份证号码！",false,function(){
			obj.select();
			obj.focus();
		});
		return false;
	}
	var W = new Array(7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2, 1);
	var A = new Array("1", "0", "x", "9", "8", "7", "6", "5", "4", "3", "2");
	var i, j, S;
	var NewID, ID, strNF;
	NewID = OldID.substring(0, 6) + "19" + OldID.substring(6,OldID.length);
	S = 0;
	for( i = 0; i <= 16; i++){
		j = NewID.substring(i, i+1) * W[i];
		S = S + j;
	}
	S = S % 11;
	if(sfzh != NewID + A[S]){
		alert("请输入正确的身份证号码！",false,function(){
			obj.select();
			obj.focus();
		});
		return false;
	}
	return true;
}

function checkSfz(obj){ 
	if (isNaN(obj.value)) {
		alert("身份证号输入的不是数字！");
		return false;
	} 
	var len = obj.value.length, re; 
	if (len == 15) 
		re = new RegExp(/^(\d{6})()?(\d{2})(\d{2})(\d{2})(\d{3})$/); 
	else if (len == 18) 
		re = new RegExp(/^(\d{6})()?(\d{4})(\d{2})(\d{2})(\d{3})(\d)$/); 
	else {
		alert("输入的身份证号数字位数不对！"); 
		return false;
	} 
	var a = obj.value.match(re); 
	if (a != null) 
	{ 
	if (len==15) { 
		var D = new Date("19"+a[3]+"/"+a[4]+"/"+a[5]); 
		var B = D.getYear()==a[3]&&(D.getMonth()+1)==a[4]&&D.getDate()==a[5]; 
	} else  { 
		var D = new Date(a[3]+"/"+a[4]+"/"+a[5]); 
		var B = D.getFullYear()==a[3]&&(D.getMonth()+1)==a[4]&&D.getDate()==a[5]; 
	} 
	if (!B) {
		alert("输入的身份证号 "+ a[0] +" 里出生日期不对！");
		return false;
	} 
	} 
	return true 
}

/**定义公用方法:检验E-Mail*/
function chkEmail(obj,msg) {
	if(obj.value == ""){
		alert("请输入邮箱！",false,function(){
			obj.select();
			obj.focus();
		});
		return false;
	}
	var reg1 = /^(.+)@(.+)\.(.+)$/g;
	var str = obj.value;
	var r1 = str.match(reg1);
	if(r1 == null){
		alert("您输入的" + msg + "邮箱不合法，请重新输入！",false,function(){
			obj.select();
			obj.focus();
		});
		return false;
	}
	return true;	
}
/**定义公用方法:显示提示信息*/
function setHideEleByTagName(tagName,sty1){
	var tmp = document.getElementsByTagName(tagName);
	for(var i = 0; i < tmp.length; i++){
		tmp[i].style.display = sty1;
	} 
}
function cancelShowTips(){
document.getElementById("tipsConv").style.display="none";
}
function showTips(msg) {
	setHideEleByTagName("select","none");
	msg = (msg == null)?"数据处理中,请稍候...":msg;
	var dd_html = "";	
	
	tipsConv = document.createElement("DIV");
	tipsConv.id = "tipsConv";
	tipsConv.oncontextmenu = function(){return false;};
	tipsConv.onSelectstart = function(){return false;};	
	tipsConv.style.cssText = "background-color:#CCCCCC;position:absolute;z-index:100;filter:alpha(opacity=20);";
	tipsConv.style.width = document.body.clientWidth;
	tipsConv.style.height = document.body.scrollHeight;
	tipsConv.style.pixelTop = 0;
	tipsConv.style.left = 0;
	tipsConv.style.display = "block";
	document.body.appendChild(tipsConv);	
	dd_html += "<table border=0 cellpadding=0 cellspacing=1 bgcolor=\"#000000\"";
	dd_html += "width=\"100%\" height=\"100%\"><tr>";
	dd_html += "<td bgcolor=#5C8DBE>";
	dd_html += "<marquee align=\"middle\" behavior=\"alternate\" scrollamount=\"2\" style=\"font-size:9pt\">";
	dd_html += "<font color=yellow>"
	dd_html += msg + "</font>";
	dd_html += "</marquee></td></tr></table>";
	tips = document.createElement("DIV");
	tips.id = "tipDiv";
	tips.innerHTML = dd_html;
	tips.style.cssText = "width:200px;height:30px;position:absolute;z-index:100;filter:alpha(opacity=70);";
	tips.style.pixelTop = lastScrollY + 120;
	tips.style.left = (document.body.clientWidth - 200) / 2;
	tips.style.display = "block";
	document.body.appendChild(tips);
}
function showMsgWin(msg,tit) {
	setHideEleByTagName("select","none");
	tit = (tit == null)?"信息提示...":tit;
	var dd_html = "";
	
	tipsConv = document.createElement("DIV");
	tipsConv.id = "tipsConv";
	tipsConv.oncontextmenu = function(){return false;};
	tipsConv.onSelectstart = function(){return false;};
	tipsConv.style.cssText = "background-color:#CCCCCC;position:absolute;z-index:100;filter:alpha(opacity=20);";
	tipsConv.style.width = document.body.clientWidth;
	tipsConv.style.height = document.body.scrollHeight;
	tipsConv.style.pixelTop = 0;
	tipsConv.style.left = 0;
	tipsConv.style.display = "block";
	document.body.appendChild(tipsConv);

	dd_html += '<center>';
	dd_html += '<div class="main1">';
	dd_html += '	  <div class="title">';
	dd_html += '		<div class="title_l"></div>';
	dd_html += '		<div class="title_m">' + tit + '</div>';
	dd_html += '		<div class="title_r"></div>';
	dd_html += '	  </div>';
	dd_html += '	  <div class="content_no" style="height:100%">';
	dd_html += '		<p>&nbsp;</p>';
	dd_html += '		<font color="red">';
	dd_html += '		  <p>' + msg + '</p>';
	dd_html += '		</font>';
	dd_html += '		<p>&nbsp;</p>';
	dd_html += '		<p align="center"><a href="javascript:closeTips()">【关 闭】</a>	</p>';
	dd_html += '	  </div>';
	dd_html += '</div> ';
	dd_html += '</center>';
	tips = document.createElement("DIV");
	tips.id = "tipDiv";
	tips.innerHTML = dd_html;
	tips.style.cssText = "width:390px;position:absolute;z-index:100;filter:alpha(opacity=80);";
	tips.style.pixelTop = lastScrollY + 120;
	tips.style.left = (document.body.offsetWidth - 400) / 2;
	tips.style.display = "block";
	document.body.appendChild(tips);
}
function closeTips(){
	setHideEleByTagName("select","");
	if($("tipsConv")){
		document.body.removeChild($("tipsConv"));
	}
	if($("tipDiv")){
		document.body.removeChild($("tipDiv"));
	}
	if($("tipIFrame")){
		document.body.removeChild($("tipIFrame"));
	}
}
/**定义公用方法:判断当前是否选中行*/
function chkCurrRow(){
	if(curr_row == null){
		alert("此操作需要有选中的行，请选择（单击）要操作的行！");
		return false;
	}else{
		var j=0;
		var tab =document.getElementsByTagName("input");
		for(var i = 0;i<tab.length;i++){
			if((tab[i].type=="checkbox")&&(tab[i].checked==true)){
				tab[i].checked = false;
			}
		}
		var checkedcho = curr_row.getElementsByTagName("input");
		for(var m = 0;m<checkedcho.length;m++ ){
			if(checkedcho[m].type=="checkbox"){
				checkedcho[m].checked = true;
			}
		}
	}
	return true;
}
/**定义公用方法:连接字符串*/
function joinTxt(){
	var outTxt = "";
	if(arguments.length > 1){
		for(var i = 1;i < arguments.length;i++){
			if(arguments[0] != "" && arguments[i] == ""){
				outTxt += (arguments[0] +"!!splitSign!!");
			}else{
				outTxt += (arguments[i] +"!!splitSign!!");
			}
		}
		outTxt = outTxt.substring(0,outTxt.length-13);
	}
	return outTxt;
}
/**定义公用方法:初始化年度下拉框*/
function initNdList(id,def){
	var idx = 0;
	var date = new Date();
	var year = date.getFullYear();
	for(var i = year - 5; i <= year + 5; i++){
		$(id).options[$(id).options.length] = new Option(i,i);
		if(i < def)idx++;
	}
	$(id).options[idx].selected = true;
}
/**定义公用方法:数据导出*/
function dataExport() {
	document.forms[0].action = "dataExport.do";
	document.forms[0].target = "_blank";
	document.forms[0].submit();
	document.forms[0].target = "_self";
}

function dataExpLDSJ() {
	document.forms[0].action = "dataExpLDSJ.do"
	document.forms[0].target = "_blank";
	document.forms[0].submit();
	document.forms[0].target = "_self";
}

function initList(hideID, fillID, def) {
	var tmp1 = $(hideID).value.split(splitSignOne);
	var tmp2 = new Array;
	for (i = 1; i < tmp1.length; i++) {
		tmp2[tmp2.length] = tmp1[i].split(splitSignTwo);
	}
	$(fillID).options.length = 0;
	for (i = 0; i < tmp2.length; i++) {
		$(fillID).options[$(fillID).options.length] = new Option(tmp2[i][2], tmp2[i][1]);
	}
	for (i = 0; i < $(fillID).options.length; i++) {
		if ($(fillID).options[i].text == def || $(fillID).options[i].value == def) {
			$(fillID).options[i].selected = true;
			return;
		}
	}
}
function expTab(the_table, tabTit, titSpan) {

	/*var HKEY_Root="HKEY_CURRENT_USER";
	var HKEY_Path="\\Software\\Microsoft\\Internet Explorer\\PageSetup\\";
	var Wsh=new ActiveXObject("WScript.Shell");
	var HKEY_Key="header";
	    Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,"");
	    HKEY_Key="footer";
	    Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,""); */ 
	var table_title = (titSpan == null || titSpan == "") ? tabTit : document.getElementById(titSpan).outerHTML;	
	var the_content = "<style media='print'>\n";
	the_content += ".noPrin{\n";
	the_content += "display:none;}\n";
	the_content += "</style>\n";
	the_content += "<link rel='stylesheet' rev='stylesheet' href='"+document.getElementById("css").getAttribute("styleserve")+"style/standard/zfoa.css' type='text/css' media='all' />\n";
	the_content += "<link rel='icon' href='/favicon.ico' type='image/x-icon' />\n";
	the_content += "<link rel='shortcut icon' href='/favicon.ico' type='image/x-icon' />\n";
	the_content += "<link rel='stylesheet' href='"+document.getElementById("css").getAttribute("styleserve")+"style/base.css' type='text/css' media='all' />\n";
	the_content += "<link rel='stylesheet' href='"+document.getElementById("css").getAttribute("styleserve")+"style/print.css' type='text/css' media='print' />\n";
	the_content += "<link rel='stylesheet' href='"+document.getElementById("css").getAttribute("styleserve")+"style/standard/default.css' type='text/css' media='all' />\n";
	the_content += "<script type='text/javascript' src='"+document.getElementById("css").getAttribute("styleserve")+"style/pngbug.js'></script>\n";
	the_content += "<object id=\"WebBrowser\" width=0 height=0 classid=\"CLSID:8856F961-340A-11D0-A96B-00C04FD705A2\"></object>\n";
	the_content += "<center><h3><b>";
	the_content += table_title;
	the_content += "</b></h3>";		
	the_content += document.all(the_table).outerHTML;
	the_content = the_content.replace(/ style=\"[^\"]*\"/g, "");
	the_content = the_content.replace(/ onclick=\"[^\"]*\"/g, "");
	the_content = the_content.replace(/ mode=\"(false|true)"/g, "");
	the_content = the_content.replace(/ oBgc=\"[\w#\d]*\"/g, "");
	the_content = the_content.replace(/ oFc=\"[\w#\d]*\"/g, "");
	the_content = the_content.replace(/<span>(5|6)<\/span>/gi, "");
	the_content = the_content.replace(/<DIV contentEditable=false>(.*)<\/DIV>/ig, "$1");
	the_content += "\n<br><div class='noPrin'><input type='button' class='button2' value='页面设置' onclick=\"WebBrowser.ExecWB(8,1)\">";
	the_content += "<input type='button' class='button2' value='打印预览' onclick=\"WebBrowser.ExecWB(7,1)\">";
	the_content += "<input type='button' class='button2' value='直接打印' onclick=\"WebBrowser.ExecWB(6,6)\">";
	the_content += "<\/div>";
	//confirm(the_content);
	var newwin = window.open("about:blank", "_blank", "");
	newwin.document.open();
	
	newwin.document.write(the_content);
	newwin.document.close();
	newwin = null;
}
function expAppTab(the_table, tabTit, titSpan) {
	var table_title = (titSpan == null || titSpan == "") ? tabTit : document.getElementById(titSpan).outerHTML;
	var the_content = "<style media='print'>\n";
	the_content += ".noPrin{\n";
	the_content += "display:none;}\n";
	the_content += "</style>\n";
	the_content += "<link rel='stylesheet' rev='stylesheet' href='skin1/style/main.css' type='text/css' media='all' />\n";
	the_content += "<object id=\"WebBrowser\" width=0 height=0 classid=\"CLSID:8856F961-340A-11D0-A96B-00C04FD705A2\"></object>\n";
	the_content += "<script language='javascript' src='style/function.js'>";
	the_content += "<script language='javascript'>";
	the_content +="var HKEY_Root,HKEY_Path,HKEY_Key;" ;
	the_content +="HKEY_Root='HKEY_CURRENT_USER';";
	the_content +="HKEY_Path='\\Software\\Microsoft\\Internet Explorer\\PageSetup\\';";
	the_content +="var Wsh=new ActiveXObject('WScript.Shell');";
	the_content +="HKEY_Key='header';";
	the_content +="Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,'');";
	the_content +="HKEY_Key='footer';";
	the_content +="Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,'');";	              
	the_content +="</script>";
	the_content += "</sc";
	the_content += "ript>\n";
	the_content += "<center><b>";
	the_content += table_title;
	the_content += "</b>";
	the_content += document.all(the_table).outerHTML;
	the_content = the_content.replace(/ style=\"[^\"]*\"/g, "");
	the_content = the_content.replace(/ onclick=\"[^\"]*\"/g, "");
	the_content = the_content.replace(/ mode=\"(false|true)"/g, "");
	the_content = the_content.replace(/ oBgc=\"[\w#\d]*\"/g, "");
	the_content = the_content.replace(/ oFc=\"[\w#\d]*\"/g, "");
	the_content = the_content.replace(/<span>(5|6)<\/span>/gi, "");
	the_content = the_content.replace(/<DIV contentEditable=false>(.*)<\/DIV>/ig, "$1");
	the_content = the_content.replace(/\*/g, " ");
	the_content += "\n<br><div class='noPrin'><input type='button' class='button2' value='页面设置' onclick=\"WebBrowser.ExecWB(8,1)\">";
	the_content += "<input type='button' class='button2' value='打印预览' onclick=\"WebBrowser.ExecWB(7,1)\">";
	the_content += "<input type='button' class='button2' value='直接打印' onclick=\"WebBrowser.ExecWB(6,6)\"></div>";
	var newwin = window.open("about:blank", "_blank", "");
	newwin.document.open();
	newwin.document.write(the_content);
	newwin.document.getElementById(the_table).getElementsByTagName("tr")[0].style.display = "none";
	var inps = newwin.document.getElementById(the_table).getElementsByTagName("INPUT");
	var sels = newwin.document.getElementsByTagName("select");
	var txts = newwin.document.getElementsByTagName("textarea");
	var buts = newwin.document.getElementsByTagName("button");
	for (i = inps.length - 1; i >= 0; i--) {
		inps[i].outerHTML = inps[i].value;
	}
	for (i = sels.length - 1; i >= 0; i--) {
		sels[i].outerHTML = sels[i].options[sels[i].selectedIndex].text;
	}
	for (i = txts.length - 1; i >= 0; i--) {
		txts[i].outerHTML = txts[i].value;
	}
	for (i = buts.length - 1; i >= 0; i--) {
		buts[i].style.display = "none";
	}
	newwin.document.close();
	newwin = null;
}
/**定义公用方法:简易报表生成*/
function expTab(the_table, tabTit, titSpan, mar) {
	if($(the_table).tagName.toLowerCase() == "table" && $(the_table).rows.length <= 1){
		alert("当前页面没有可打印的数据！");
		return false;
	}
	if(mar){		
		try{
			var mars = mar.split("-");
			PageSetup(mars[0],mars[1],mars[2],mars[3],mars[4],mars[5]);
		}catch(e){
			
		}
	}
	
	var table_title = (titSpan == null || titSpan == "") ? tabTit : $(titSpan).innerText;
	
	var the_content = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
	the_content += "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n";
	the_content += "<head>\n";
	the_content += "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=GBK\" />\n";
	the_content += "<meta http-equiv=\"Content-Language\" content=\"GBK\" />\n";
	the_content += "<%@include file=\"/common/head.ini\"%>\n";
	//<link rel="stylesheet" href="http://10.71.19.19:82/zfstyle_v4/css/public.css" type="text/css" media="all" />
	//<link rel="stylesheet" href="http://10.71.19.19:82/zfstyle_v4/css/module.css" type="text/css" media="all" />
	//<link rel="stylesheet" href="http://10.71.19.19:82/zfstyle_v4/css/skin_blue.css" type="text/css" media="all" />
	the_content += "<link rel=\"stylesheet\" href=\"/zfstyle_v4/css/public.css\" type=\"text/css\" media=\"all\" />\n";
	the_content += "<link rel=\"stylesheet\" href=\"/zfstyle_v4/css/module.css\" type=\"text/css\" media=\"all\" />\n";
	the_content += "<link rel=\"stylesheet\" href=\"/zfstyle_v4/css/skin_blue.css\" type=\"text/css\" media=\"all\" />\n";
	the_content += "<style>@media print {.hideWhenPrint {display: none;}}</style>";
	the_content += "<object id=\"WebBrowser\" width=0 height=0 classid=\"CLSID:8856F961-340A-11D0-A96B-00C04FD705A2\"></object>\n";
	the_content += "</head>\n<body>\n";
	the_content += "<div class=\"printview\">\n<h3>";
	the_content += table_title;
	the_content += "</h3>\n";
	the_content += $(the_table).outerHTML;
	the_content = the_content.replace(/( *)(style=\")(.*)(\")/gi, "");
	the_content = the_content.replace(/(<td.*<input.*)(checkbox|text)(.*\/td>)/gi, "");
	the_content = the_content.replace(/( *)(on)([dbl]*)(click=\")(.*)(\")/gi, "");
	the_content = the_content.replace(/on[a-z]*=\w*\(\)/g, "");
	the_content = the_content.replace(/on[a-z]*=\"\w*\(\'\w*\'\)\"/g, "");
	//the_content = the_content.replace(/>\s*删\s*除\s*</g, "");
	the_content = the_content.replace(/(<span)(.*)(<\/span>)/gi, "");
	the_content += "\n<div class=\"hideWhenPrint\"><button onclick=\"WebBrowser.ExecWB(8,1)\">页面设置</button>";
	the_content += "<button onclick=\"WebBrowser.ExecWB(7,1)\">打印预览</button>";
	the_content += "<button onclick=\"WebBrowser.ExecWB(6,6)\">直接打印</button></div>\n";
	the_content += "</body>\n</html>";
	
	var newwin = window.open("about:blank", "_blank", "");
	newwin.document.open();
	newwin.document.write(the_content);
	newwin.document.close();
	newwin = null;
}

/**定义公用方法:通过name属性改变复选框状态*/
function chgChkAll(obj,oName){
	var boxes = document.getElementsByName(oName);
	for(var i = 0; i < boxes.length; i++){
		boxes[i].checked = obj.checked;
	}
}

//qukong
function chgChkNull(){
	var boxes = document.getElementsByTagName("input");
	for(var i = 0; i < boxes.length; i++){
		if(boxes[i].type=="text"||boxes[i].type=="password"){
			boxes[i].value=boxes[i].value.toString().replace(/^\s+|\s+$/g,"");
		}
		
	}
}



function printTable(){
	/**
	var ht = window.frames["mainFrame"].document;
	var num = ht.getElementsByTagName("input");
	alert(num.length);
	* */
}
function cxxy(a,b,c,d){
	$("kjName").value = a;
	showTopWin(b,c,d);
	//window.open(b,'','');
}
function xdxy(){
		var dm = $("dm").value;
		
		var dmxx = dm.split(",");
		if(window.dialogArguments.$("xyldxxb.yhm")){
			window.dialogArguments.$("xyldxxb.yhm").value = dmxx[0];
		}
		if(window.dialogArguments.$("xyldxxb.ldxm")){
			window.dialogArguments.$("xyldxxb.ldxm").value = dmxx[1];
		}
		if(window.dialogArguments.$("yhm")){
		window.dialogArguments.$("yhm").value = dmxx[0];
		window.dialogArguments.$("xm").value = dmxx[1];
		}
        window.close();
	}
	
function xdxybm(){
		var dm = $("dm").value;
		var dmxx = dm.split(",");
		if(window.dialogArguments.$("xyldxxb.fgbm") && window.dialogArguments.$("xyldxxb.fgbmmc")){
			if (window.dialogArguments.$("xyldxxb.fgbm").value.length ==0) { 
				window.dialogArguments.$("xyldxxb.fgbm").value = dmxx[0];
				window.dialogArguments.$("xyldxxb.fgbmmc").value = dmxx[1];	
			} else {
				//alert(window.dialogArguments.$("fgbm"))
				var fgbm =window.dialogArguments.$("xyldxxb.fgbm").value.split(",");
			     for (i = 0; i < fgbm.length; i++) {
					if (fgbm[i] ==dmxx[0] ) {
						alert("此学院已经存在！");
						return false;
					}
				}	
				window.dialogArguments.$("xyldxxb.fgbm").value =window.dialogArguments.$("xyldxxb.fgbm").value+','+ dmxx[0];
				window.dialogArguments.$("xyldxxb.fgbmmc").value = window.dialogArguments.$("xyldxxb.fgbmmc").value+','+dmxx[1];
			}
		}
		 if(window.dialogArguments.$("fgbm")) { 
			if (window.dialogArguments.$("fgbm").value.length ==0) { 
				window.dialogArguments.$("fgbm").value = dmxx[0];
				window.dialogArguments.$("fgbmmc").value = dmxx[1];	
			}else {
				//alert(window.dialogArguments.$("fgbm"))
				var fgbm =window.dialogArguments.$("fgbm").value.split(",");
			     for (i = 0; i < fgbm.length; i++) {
					if (fgbm[i] ==dmxx[0] ) {
						alert("此学院已经存在！");
						return false;
					}
				}	
				window.dialogArguments.$("fgbm").value =window.dialogArguments.$("fgbm").value+','+ dmxx[0];
				window.dialogArguments.$("fgbmmc").value = window.dialogArguments.$("fgbmmc").value+','+dmxx[1];
			}
		}
        window.close();
	}	
function rowonclick(objTr){
   if(curr_row != null && curr_row.tagName.toLowerCase() == "tr"){
      curr_row.style.backgroundColor="#FFFFFF"; 
   }
   curr_row = objTr; 
   curr_row.style.backgroundColor=obj_bgc; 
   document.forms[0].dm.value=curr_row.id;
}

function clearValue(a){
	var dmxx = a.split(",");
	for (i = 0; i < dmxx.length; i++) {
		$(dmxx[i]).value="";
	}	
 }
 
function getChoose(obj,processid){
	if (processid!=null)
	{
		refreshForm('cxczr.do?processid='+processid+'&chk='+obj.value);
	}
	else{
		refreshForm('cxczr.do?chk='+obj.value);
	}
} 


function cxzxr_change(obj,b,c,d){
	var i = obj.selectedIndex;
	if(i=0){
		
		return false;
	}
	else if(i<0){
	
		return false;
	}
	else{
		var txt = obj.options[obj.selectedIndex].value;
        refreshForm('cxczr.do?processid='+d+'&chk='+c+'&'+b+'='+txt);     
	}
}
//判断是不是电话号码
//校验普通电话、传真号码：可以“+”开头，除数字外，可含有“-”
function isTel(s)    
{    
	if(s != null && s != "") {
		//var patrn=/^[+]{0,1}(\d){1,3}[ ]?([-]?(\d){1,12})+$/;    
		var patrn=/^[+]{0,1}(\d){1,3}[ ]?([-]?((\d)|[ ]){1,12})+$/;    
		if (!patrn.exec(s)) {
			alert("请输入正确的电话号码");
			return false   
		} else 
			return true   
	}
}  


function isEmail(src) {   
	isEmail1    = /^\w+([\.\-]\w+)*\@\w+([\.\-]\w+)*\.\w+$/;  
 	isEmail2    = /^.*@[^_]*$/;
    return (isEmail1.test(src) && isEmail2.test(src));  
}

//显示下拉列表框
function dispDdlList(data){
	var objId =data[0];
	if((data[1] == null && typeof data[1] == 'object')||(data[1] == "" && typeof data[1] == 'object')){
		BatAjax.removeAllOptions(objId);
		return false;
	}
	if($(data[0]) && $(data[0]).tagName.toLowerCase() == "select"){
		BatAjax.removeAllOptions(objId);
		BatAjax.addOptions(objId,data[1],data[2],data[3]);
		if($(data[0]).options[0].value=="null"){
			$(data[0]).options[0].value = "";	
		}	
	}
	if(data[4]){
	if($(data[4])){
		if($(data[4]).value){
			var defaultVal = replaceChar($(data[4]).value," ","");
			DWRUtil.setValue(objId,defaultVal);
		}
    }
	}
	if($("bdzdStr")) {
		var unShowbdzd = $("bdzdStr").value;
		var bdzdArray = unShowbdzd.split(",");
		var flag = false;
		for(i = 0;i < bdzdArray.length;i++) {
			if(bdzdArray[i] === objId) {
				flag=true;
				break;
			}
		}
		if(flag) {
			var text = $(objId).options[$(objId).selectedIndex].text;
			var value = $(objId).value;
			$(objId).options.length=1;
			$(objId).options[0] = new Option(text , value);
		}
	}
	try{
		operationSeleced();//lost next
	}catch(e){}
	
} 

//显示下拉列表框
function dispDdlList2(data){
	var objId =data[0];
	if((data[1] == null && typeof data[1] == 'object')||(data[1] == "" && typeof data[1] == 'object')){
		BatAjax.removeAllOptions(objId);
		return false;
	}
	if($(data[0]) && $(data[0]).tagName.toLowerCase() == "select"){
		//BatAjax.removeAllOptions(objId);
		BatAjax.addOptions(objId,data[1],data[2],data[3]);
		if($(data[0]).options[0].value=="null"){
			$(data[0]).options[0].value = "";	
		}	
	}
	if(data[4]){
	if($(data[4])){
		if($(data[4]).value){
			var defaultVal = replaceChar($(data[4]).value," ","");
			DWRUtil.setValue(objId,defaultVal);
		}
    }
	}
	if($("bdzdStr")) {
		var unShowbdzd = $("bdzdStr").value;
		var bdzdArray = unShowbdzd.split(",");
		var flag = false;
		for(i = 0;i < bdzdArray.length;i++) {
			if(bdzdArray[i] === objId) {
				flag=true;
				break;
			}
		}
		if(flag) {
			var text = $(objId).options[$(objId).selectedIndex].text;
			var value = $(objId).value;
			$(objId).options.length=1;
			$(objId).options[0] = new Option(text , value);
		}
	}
	try{
		operationSeleced();//lost next
	}catch(e){}
	
} 

//显示下拉列表框
function dispDdlListZdy(data){
	var objId =data[0];
	if((data[1] == null && typeof data[1] == 'object')||(data[1] == "" && typeof data[1] == 'object')){
		BatAjax.removeAllOptions(objId);
		return false;
	}
	if($(data[0]) && $(data[0]).tagName.toLowerCase() == "select"){
		BatAjax.removeAllOptions(objId);
		BatAjax.addOptions(objId,data[1],data[2],data[3]);
		if($(data[0]).options[0].value=="null"){
			$(data[0]).options[0].value = "";	
		}	
	}
	if(data[4]){
	if($(data[4])){
		if($(data[4]).value){
			var defaultVal = replaceChar($(data[4]).value," ","");
			DWRUtil.setValue(objId,defaultVal);
		}
    }
	}
	try{
		operationSeleced();//lost next
	}catch(e){}
} 
//通过数组来显示下拉列表
//此方法适用于取单个值的情况，不支持去两列数据的情况。data中包含下拉列表框的ID，满足所有条件的数组，显示数据的数组，默认值id
function dispArrayList(data) {
	var objId = data[0];
	var strArray = data[1];
	var obj = data[2];
	var ele = $(objId);
	ele.options.length=0;
	ele.options[0]=new Option("请选择","请选择");
	for(i = 0;i < obj.length;i++) {
		for(j = 0;j < strArray.length;j++) {
			if(strArray[j] === obj[i]) {
				ele.options[ele.options.length] = new Option(obj[i] , obj[i]);
			}
		}
	}
	if(data[3]) {
		DWRUtil.setValue(objId,$(data[2]).value);
	}
}

function dispDdlBean(data) {
	var objId = data.dispControl;
	if ((data.datalist == null && typeof data.datalist == 'object')
			|| (data.datalist == "" && typeof data.datalist == 'object')) {
		BatAjax.removeAllOptions(objId);
		return false;
	}
	if ($(objId) && $(objId).tagName.toLowerCase() == "select") {
		BatAjax.removeAllOptions(objId);
		BatAjax.addOptions(objId, data.datalist, data.valueLine,data.textLine);
		if ($(objId).options[0].value == "null") {
			$(objId).options[0].value = "";
		}
	}
	if (data.initControl) {
		if ($(data.initControl)) {
			if ($(data.initControl).value) {
				DWRUtil.setValue(objId, $(data.initControl).value);
			}
		}
	}else if(data.initValue){
		DWRUtil.setValue(objId, data.initValue);
	}
	
}
function dispDdlListTree(data){
	var objId =data[0];
	if((data[1] == null && typeof data[1] == 'object')||(data[1] == "" && typeof data[1] == 'object')){
		BatAjax.removeAllOptions(objId);
		return false;
	}
	if($(data[0]) && $(data[0]).tagName.toLowerCase() == "select"){
		BatAjax.removeAllOptions(objId);
		BatAjax.addOptions(objId,data[1],data[2],data[3]);
		if($(data[0]).options[0].value=="null"){
			$(data[0]).options[0].value = "";	
		}	
	}
	   if(data[4]){
	   	if($(data[4])){
    	if($(data[4]).value){
    	   	DWRUtil.setValue(objId,$(data[4]).value);}}
    }   
} 

function showDiv(d_html,w,h){
	i = document.getElementsByTagName("select").length;
	for(j = 0;j<i;j++){
		document.getElementsByTagName("select")[j].style.visibility = "hidden";
	}   
	var d_width = document.body.clientWidth;
	var d_height = document.body.clientHeight;
	var d_left = 0;
	var d_top = 0;
	var d_color = "#EEF4F9";	
	var d_width_top = w;
	var d_height_top = h;
	var d_left_top = (d_width - d_width_top)/2;
	var d_top_top = (d_height - d_height_top)/2-50;
	var d_color_top = "#EEF4F9";
	dd_html = "<div oncontextmenu='return false' onselectstart='return false' style='filter:alpha(opacity=50);position:absolute;align:middle;text-align:center;padding-top:10px;border: 1px solid #5E88B8; width:"+d_width+"px; height:"+d_height+"px; top:"+d_top+"px; left:"+d_left+"px; background-color:"+d_color+"'>";
	dd_html += "</div>";
	dd_html += "<div style='position:absolute;align:middle;text-align:center;padding-top:10px;border: 1px solid #5E88B8; width:"+d_width_top+"px; height:"+d_height_top+"px; top:"+d_top_top+"px; left:"+d_left_top+"px; background-color:"+d_color_top+"'>";
	dd_html += "<br>";
	dd_html += d_html;
	dd_html += "<br>";
	dd_html += "</div>";
	tmpdiv.innerHTML=dd_html;
}

function closeAdd(){
	i = document.getElementsByTagName("select").length;
	for(j = 0;j<i;j++){
		document.getElementsByTagName("select")[j].style.visibility = "";
	}
	dd_html="";
	tmpdiv.innerHTML=dd_html;
}

/*function AJAX显示表格
*data 表格数据源
*objid 绑定的控件名称
*fun_list 功能数组*/
function dispTable(data,objid,fun_list,onclick,ondblclick){	
	if(data == null){
		return false;
	}
	var optAdd = {};	
	optAdd.rowCreator = function(){
	  var tr = document.createElement("tr");
	  tr.style.cssText = "cursor:hand";
	  if(onclick){
	  	  tr.onclick = onclick;	  	
	  }
	  if(ondblclick){
	  	  tr.ondblclick = ondblclick;	  	
	  }	
  	  return tr;
	};
	BatAjax.removeAllRows(objid); 
	BatAjax.addRows(objid,data,fun_list,optAdd);
	BatAlert.closeTips();
}



/**定义公用方法:检验身份证号码*/
function chkSfzh(obj){
	var sfzh=obj.value;
	var OldID;
	if(sfzh.length == 15){
		OldID = sfzh;
		return true;
	}else if(sfzh.length == 18){
		OldID = sfzh.substring(0, 6) + sfzh.substring(8,sfzh.length-1);
	}else{
		alert("请输入正确的身份证号码！");
		return false;
	}
	var W = new Array(7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2, 1);
	var A = new Array("1", "0", "x", "9", "8", "7", "6", "5", "4", "3", "2");
	var i, j, S;
	var NewID, ID, strNF;
	NewID = OldID.substring(0, 6) + "19" + OldID.substring(6,OldID.length);
	S = 0;
	for( i = 0; i <= 16; i++){
		j = NewID.substring(i, i+1) * W[i];
		S = S + j;
	}
	S = S % 11;
	if(sfzh != NewID + A[S]){
		alert("请输入正确的身份证号码！");
		return false;
	}
	return true;
}

/*功能描述:完成CHECKBOX全选和全消操作
 * 参数1 事件源控件名称
 * 参数2 操作源控件名称 * 
 * */
 
function checkBox_select(control_event,control_oper,id){
	if($(control_event)){		
		if($(control_oper)){						
			for(i=0;i<$(control_oper).getElementsByTagName("input").length;i++){
				if($(control_oper).getElementsByTagName("input")[i].type == "checkbox" && $(control_oper).getElementsByTagName("input")[i].disabled==false){
					$(control_oper).getElementsByTagName("input")[i].checked = $(control_event).checked;
				}
			}
		}
	}
}

/*功能描述:判断一个控件的值是否为空
 * 参数1 事件源控件ID
 * 参数2 弹出语句 * 
 * 参数3 是否选中控件
 * */
function isObjNull(id,text,sel){
		if($(id).value == ""){
			if($("WebOffice")){
				alert(text,false,function(){
					if(parseInt(sel)==1){
							try{
								$(id).select();
								$(id).focus();
							}catch(e){}	
					}			
				});
				return false;
			}else{
				alert(text,false,function(){
					if(parseInt(sel)==1){
						try{
							$(id).select();
							$(id).focus();
						}catch(e){}
					}			
				});
				return false;
			}
		}
		return true;
}
/*功能描述:是否为数字
 * 参数1 事件源控件ID
 * 参数2 弹出语句 * 
 * 参数3 是否选中控件
 * */
function checkNaN(id,text,sel){
		if(isNaN($(id).value)){
			if($("WebOffice")){
				alert(text,false,function(){
				if(parseInt(sel)==1){
					$(id).select();
					$(id).focus();
				}			
		});
				return false;
			}else{
				alert(text,false,function(){
				if(parseInt(sel)==1){
					$(id).select();
					$(id).focus();
				}			
		});
				return false;
			}
		}
		return true;
}
function isObjCheck(id,text,sel){
	for(i=0;i<document.getElementsByName(id).length;i++){
		if(document.getElementsByName(id)[i].checked==true){
			return true;
		}		
	}
     alert(text,false,function(){
				if(parseInt(sel)==1){
					$(id).select();
					$(id).focus();
				}			
	 });
	 return false;
}

function isAllObjNull(str){	
	for(i=0;i<str.length;i++){		
		if(!isObjNull(str[i][0],str[i][1],str[i][2])) {
			break;
		}			
	}	
	if(i < str.length)
		return false;
	else if(i == str.length)
		return true;
}

function chkUsername(obj,text) {
	var reg1 = /^[0-9a-zA-Z]+$/g;
	var str = $(obj).value;
	var r1 = str.match(reg1);
	if(r1 == null){
		alert(text,false,function(){
				//$(obj).select();
				//$(obj).focus();
		});
		return false;
	} else {
		return true;
	}
}

/*功能描述:判断一个控件的值是否合法
 * 参数1 事件源控件ID 
 * 参数2 控件内容格式*
 *  * 参数3 是否选中控件
 * */
 function isRightObj(id,format,sel) {
 	//alert($(id).value);
 	//alert(format);
 	if($(id).value=="")
 		return true;
 	if(format=="username"&&$(id).value != "") {
 		var reg1 = /^[0-9a-zA-Z]+$/g;
		var str = $(id).value;
		var r1 = str.match(reg1);
		if(r1 == null){
			alert("用户名只能由字母和数字组成，不得含有其他字符！",false,function(){
				if(parseInt(sel)==1){
					$(id).select();
					$(id).focus();
				}
			});
			return false;
		}
 	} else if(format=="tel"){
 		if(!isTel($(id))&&$(id).value != "") {
 				alert("电话号码不符合要求！",false,function(){
				if(parseInt(sel)==1){
					$(id).select();
					$(id).focus();
				}
			});
			return false;
 		}
 	} else if(format=="email"&&$(id).value!=""){
 		if(!isEmail($(id).value)) {
 				alert("电子邮箱不符合要求！",false,function(){
				if(parseInt(sel)==1){
					$(id).select();
					$(id).focus();
				}
			});
			return false;
 		}
 	} else if(format == "identity"&&$(id).value != "") {
 		if(!chkSfzh($(id))) {
 			alert("身份证号码不符合要求！",false,function(){
				if(parseInt(sel)==1){
					$(id).select();
					$(id).focus();
				}
			});
			return false;
 		}
 	} /*else if(format == "name" &&$(id).value != "") {
 		if(!chkName2($(id))) {
 			alert("姓名不符合要求！",false,function(){
				if(parseInt(sel)==1){
					$(id).select();
					$(id).focus();
				}
			});
			return false;
 		}
 	}*/
 		return true;
 }
 
 function isAllRightObj(str) {
 	for(i=0;i<str.length;i++){
 		if(!isRightObj(str[i][0],str[i][1],str[i][2])) {
 			break;
 		}
 	}
 	if(i < str.length)
 		return false;
 	if(i == str.length)
 		return true;
 }

/*功能描述:判断一个控件的值是否超出范围
 * 参数1 事件源控件ID 
 * 参数2 控件的最小长度*
 *  * 参数3 控件的最大长度*
 * *  * 参数4 控件名称*
 * *  * 参数5 是否选中控件
 * */
function isLength(id,minl,maxl,text,sel) {	
	if($(id).value == "")
		return false;
	else if($(id).value != "") {
		
		if($(id).value.length >parseInt(maxl)){
			//alert("1");
			alert( text+"太长,请重新输入！",false,function(){
				if(parseInt(sel) == 1) {
					$(id).select();
					$(id).focus();
				}
			});
			return false;
		}
		if($(id).value.length < parseInt(minl)){
			//alert("2");
			alert(text+"太短,请重新输入！",false,function(){
				if(parseInt(sel) == 1) {
					$(id).select();
					$(id).focus();
				}
			});
			return false;
		}
		return true;
	}
}

function isAlllenRight(str) {
	for(i = 0;i < str.length;i++) {
		if(!isLength(str[i][0],str[i][1],str[i][2],str[i][3],str[i][4])) {
			break;
		}
	}
	if(i < str.length)
		return false;
	else if(i == str.length)
		return true;
}
//打开组织结构代码表
function openTree(mxdxid,mode,valcont,listcont,selectPNum){
	//showTopWin("search_person_tree.do?mxdxid="+mxdxid+"&mode="+mode+"&valcont="+valcont+"&listcont="+listcont+"&id="+$(valcont).value+"&name="+$(listcont).value,600,600);
	//window.open("search_person_tree.do?mxdxid="+mxdxid+"&modi="+mode+"&valcont="+valcont+"&listcont="+listcont,600,600);
	//showTopWin("searchperson.do?mxdxid="+mxdxid+"&mode="+mode+"&valcont="+valcont+"&listcont="+listcont+"&id="+$(valcont).value+"&name="+$(listcont).value,620,640,"Y");
  //alert(encodeURIComponent($(listcont).value))
  
  var name =$(listcont).value;
  // encodeURIComponent($(listcont).value.Trim())
  //if(name.indexOf("_")<0){
  //	name = name.replaceAll('%','___');
 // }
  showTopWin("allPersonTree.action?mxdxid="+mxdxid+"&mode="+mode+"&valcont="+valcont+"&listcont="+listcont+"&id="+$(valcont).value+"&name="+name+"&selectPNum="+selectPNum,620,580,"Y");
    
}
function openTreeOfDepname(mxdxid,mode,valcont,listcont,selectPNum,depname){
	//showTopWin("search_person_tree.do?mxdxid="+mxdxid+"&mode="+mode+"&valcont="+valcont+"&listcont="+listcont+"&id="+$(valcont).value+"&name="+$(listcont).value,600,600);
	//window.open("search_person_tree.do?mxdxid="+mxdxid+"&modi="+mode+"&valcont="+valcont+"&listcont="+listcont,600,600);
	//showTopWin("searchperson.do?mxdxid="+mxdxid+"&mode="+mode+"&valcont="+valcont+"&listcont="+listcont+"&id="+$(valcont).value+"&name="+$(listcont).value,620,640,"Y");
  //alert(encodeURIComponent($(listcont).value))
  
  var name =$(listcont).value;
  // encodeURIComponent($(listcont).value.Trim())
  //if(name.indexOf("_")<0){
  //	name = name.replaceAll('%','___');
 // }
  showTopWin("allPersonTree.action?depname="+depname+"&mxdxid="+mxdxid+"&mode="+mode+"&valcont="+valcont+"&listcont="+listcont+"&id="+$(valcont).value+"&name="+name+"&selectPNum="+selectPNum,620,580,"Y");
    
}
function openTreebyone(mxdxid,mode,valcont,listcont){
	//showTopWin("search_person_tree.do?mxdxid="+mxdxid+"&mode="+mode+"&valcont="+valcont+"&listcont="+listcont,600,600);
	//window.open("search_person_tree.do?mxdxid="+mxdxid+"&modi="+mode+"&valcont="+valcont+"&listcont="+listcont,600,600);
    showTopWin("searchperson.do?mxdxid="+mxdxid+"&mode="+mode+"&valcont="+valcont+"&listcont="+listcont+"&id="+$(valcont).value+"&name="+$(listcont).value,620,640,"Y");
}

function openCxzxr(mxdxid,valcont,listcont){
	showTopWin("cxczr.do?mxdxid="+mxdxid+"&valcont="+valcont+"&listcont="+listcont,580,510);
	/*if(mxdxid=="") {
		openTree(mxdxid,"2",valcont,listcont);
	} else {
		showTopWin("chooseFlowPerson.action?mxdxid="+mxdxid+"&valcont="+valcont+"&listcont="+listcont,550,450);
	}*/
}

//选择下拉列表框
function selectDdl(idV,id){
	if($(idV) && $(idV).value != "" && $(idV).value != null){
		for(var i = 0;i < $(id).options.length; i++){
			if($(id).options[i].value == $(idV).value){
				$(id).options[i].selected = true;
					return true;
			}
		}
	}	
} 
function sleectRadio(idV,id){
	if($(idV) && $(idV).value != "" && $(idV).value != null){
	for(i=0;i<document.getElementsByName(id).length;i++){
			document.getElementsByName(id)[i].checked=false;
			if(document.getElementsByName(id)[i].value==$(idV).value){
				document.getElementsByName(id)[i].checked=true;
			}
	}
	}
}

function openpdf(sUrl,jc){
	if (jc==""){
		return false;
	}
	document.forms[0].action = sUrl;
	document.forms[0].target = "_blank";
	document.forms[0].submit();
	document.forms[0].target = "_self";
}

function checkMobile(){
			var sMobile = document.mobileform.mobile.value
			if(!(/^1[3|5][0-9]\d{4,8}$/.test(sMobile))){

				alert("不是完整的11位手机号或者正确的手机号前七位");

				document.mobileform.mobile.focus();

				return false;

			}
			window.open('', 'mobilewindow', 'height=197,width=350,status=yes,toolbar=no,menubar=no,location=no')
		}



function resetHeight(obj,height1){
	if(	$(obj)){
		var height=document.documentElement.offsetHeight-height1;
		$(obj).style.cssText="overflow-y:auto;height:"+height;
	}
}

function resetHeightDM(obj,height1){
	if(	$(obj)){
		var height=document.documentElement.offsetHeight-height1;
		$(obj).style.cssText+=";height:"+height;
	}
}

function getKeyVal(keyVal){
    return function(array) {return eval(keyVal);};
}

function getHiddenKayVal(keyVal,hiddenKey){
    return function(array) {
    		var span=	document.createElement("span");
			span.innerHTML=eval(keyVal);
			var hiddenid = document.createElement("input");
			hiddenid.type = "hidden";
			hiddenid.value =eval(hiddenKey);
			span.appendChild(hiddenid);    	
    	return span;};
}
function getChkboxKeyVal(checkKeyVal) {
	return function(array) {
		var span=document.createElement("span");
		var chk = document.createElement("input");
		chk.type = "checkbox";
		chk.value = eval(checkKeyVal);
		span.appendChild(chk);  	
		return span;}
}
function dblClick(){//如果要特别指定双击事件  在页面从写次函数
   	  if($("edit")){
   	  	$("edit").onclick;	  
   	  }
}
function dispTableList(data){
 if(data[1].length == 0 && typeof data[1] == "object"){
		curr_row=null;
		BatAlert.closeTips();	
		BatAjax.removeAllRows(data[0]); 
		var tr=document.createElement("tr");
		var td=document.createElement("td");
		td.colSpan=data[2].length;
		td.align="center";
		td.innerText="暂无数据！";
		tr.appendChild(td);
		$(data[0]).appendChild(tr);
		return false;
	}

	if($("num")){
		if(data[3]){
			$("num").innerText = data[3].maxRecord;
		}else{
			$("num").innerText = data[1].length;
		}
	}
	var array =data[1];
	var arr_hidden=new Array();	
	if(data[4]){
		arr_hidden=data[4];		
	}  
	//var mailList=dispTableGetList(array,data[2],arr_hidden); OLD
	var mailList=dispTableGetList(array,data[2],arr_hidden,new Array());	//new add 'new Array()'

	if(data[5]){

		mailList[mailList.length]=dispTableTaxis(array,data[5]);		
	}

	var optAdd = {};   
      optAdd.rowCreator = function(){
	  var tr = document.createElement("tr");
	  tr.onclick = function(){
	  	rowOnClick(this);
   	  };
   	  if($("edit")){
   	  	tr.ondblclick = $("edit").onclick;	  
   	  } else if($("exa_capability")) {
   	  	tr.ondblclick = $("exa_capability").onclick;	
   	  } else {
   	  }
	  return tr;
	};		
	BatAjax.removeAllRows(data[0]); 
	curr_row=null;
	BatAjax.addRows(data[0],array,mailList,optAdd);
	BatAlert.closeTips();	
	if(data[3]){
		initPage(data[3]);
	}
}


function resetHeightPages(obj,height1,height2){
	if(height1=="") height1=98;
	if(height2=="") height2=32;
	var pagesize=10;
	if($(obj)){		
		var height=document.documentElement.offsetHeight-height1;
		$(obj).style.cssText="vertical-align:top;overflow-y:auto;height:"+height;
		pagesize=height/height2;
		pagesize=Math.floor(pagesize); 
		if($("pagesize")){
			$("pagesize").value=pagesize;			
		}
	}
}

//对象，是否多选，列数，行数
function emptyTableBean(objs,ischkField,rowsize,pagessize){

	var pagesize = pagessize;
	if(true){//如果结果集为空	
		if ($("RsCount")) {
			$("RsCount").innerText="0";
		}
		curr_row=null;
		BatAlert.closeTips();	
		BatAjax.removeAllRows(objs); 
		for(i = 0;i < pagesize;i++) {
			var tr=document.createElement("tr");
			var length = 0;
			if(ischkField){
				length = rowsize+1;
			}else{
				length = rowsize;
			}
			for(j = 0;j < length;j++) {
				var td=document.createElement("td");
				td.align="center";
				if(ischkField && j==0){
					td.innerHTML="<input type=\"checkbox\" id=\"tempCheck\" disabled=\"true\"/>";
				} else {
					td.innerHTML="&nbsp;&nbsp;";
				}
				tr.appendChild(td);
				if($("add")){
	   	  			//tr.ondblclick = $("add").onclick;	  
	   			}
			}
			$(objs).appendChild(tr);
		}
		return false;
	}
	
}

function singleclick(){}//单击
function dispTableBean(data){

	if(data.datalist != null && data.datalist.length > 0) {
		initPage(data.pages);
	} else {
		$("maxrecord").innerText="0";
	}
	if ($("RsCount")&& data.pages) {
		$("RsCount").innerText = data.pages.maxRecord;
	}
	var pagesize = data.pages.pageSize;
	if((data.datalist == null || data.datalist.length == 0) && typeof data.datalist == "object"){//如果结果集为空	
		if ($("RsCount")) {
			$("RsCount").innerText="0";
		}
		curr_row=null;
		BatAlert.closeTips();	
		BatAjax.removeAllRows(data.dispControl); 
		for(i = 0;i < pagesize;i++) {
			var tr=document.createElement("tr");
			var length = 0;
			if(data.chkField){
				length = data.showTxt.length+1;
			}else{
				length = data.showTxt.length;
			}
			for(j = 0;j < length;j++) {
				var td=document.createElement("td");
				td.align="center";
				if(data.chkField && j==0){
					td.innerHTML="<input type=\"checkbox\" id=\"tempCheck\" disabled=\"true\"/>";
				} else {
					td.innerHTML="&nbsp;&nbsp;";
				}
				tr.appendChild(td);
				if($("add")){
	   	  			//tr.ondblclick = $("add").onclick;	  
	   			}
			}
			$(data.dispControl).appendChild(tr);
		}
		return false;
	}
	if($("num")){
		if(data.pages){
			$("num").innerText =data.pages.maxRecord;
		}else{
			$("num").innerText = data.datalist.length;
		}
	}
	var array =data.datalist;
	
	var arr_hidden=data.hiddentxt;
	var mailList=new Array();	
	
	if(data.chkField){
		mailList[mailList.length]= eval("getChkKayVal()");
	}	
	mailList=dispTableGetList(array,data.showTxt,arr_hidden,mailList);

	if(data.taxis.taxisField!=""){
		mailList[mailList.length]=dispTableTaxis(array,data.taxis);		
	}

	var optAdd = {};   
    optAdd.rowCreator = function(){
		var tr = document.createElement("tr");
		tr.onclick = function(){
		 	rowOnClick(this);
		 	if($("rowclick")) {
		 		$("rowclick").value="yes";
		 	}
		  	singleclick();//Page maybe change single click,event,rewrite this function
		  	if($("editSection")) {
		  		$("editSection").value="yes";
		  	}
	   	};
	   
	   	if(data.ondblclick!=""){
	
		   	tr.ondblclick =function (){
		   		eval(data.ondblclick);   	  		
		   	}
	   	} else if($("edit") && !$("editLxjd") && !$("editLxtj")){
	   	  	tr.ondblclick = $("edit").onclick;	  
	   	}
	   	return tr;
	};		
	BatAjax.removeAllRows(data.dispControl); 
	curr_row=null;		
	if(data.showHtml.length==0){//没有HTML列 默认
		BatAjax.addRows(data.dispControl,array,mailList,optAdd);
	} else {
		//增加参数 显示的列，全部列，是否有多选框
		var newalllist=new Array();
		for(f=0;f<data.hiddentxt.length;f++) {
			newalllist[newalllist.length]=data.hiddentxt[f];
		}
		for(f=0;f<data.showTxt.length;f++) {
			newalllist[newalllist.length]=data.showTxt[f];
		}
		BatAjax.addRowsHtml(data.dispControl,array,mailList,optAdd,data.showHtml,newalllist);
	}
	var offset = pagesize - data.datalist.length;
	if(offset > 0) {
		for(i = 0;i < offset;i++) {
			var tr=document.createElement("tr");
			var length = 0;
			if(data.chkField){
				length = data.showTxt.length + 1;
			}else{
				length = data.showTxt.length;
			}
			for(j = 0;j < length;j++) {
				var td=document.createElement("td");
				td.align="center";
				if(data.chkField && j==0){
					td.innerHTML="<input type=\"checkbox\" id=\"tempCheck\" disabled=\"true\"/>";
				} else {
					td.innerHTML="&nbsp;&nbsp;";
				}
				tr.appendChild(td);
				if($("add")){
	   	  			//tr.ondblclick = $("add").onclick;	  
	   			}
			}
			$(data.dispControl).appendChild(tr);
		}
	}
	BatAlert.closeTips();	
	if(data.pages){
		initPage(data.pages);
	}

	if($("hzyobjValue")) {
		dispCheck($("hzyobjValue").value);
	}
	if($("setCheckStr")) {
		setDefaultCheck();
	}
}


function dispTableBeanTwo(data){
	if(data.datalist != null && data.datalist.length > 0) {
		initPage(data.pages);
	}
	if ($("RsCount")&& data.pages) {
		$("RsCount").innerText = data.pages.maxRecord;
	}
	var pagesize = data.pages.pageSize;
	if((data.datalist == null || data.datalist.length == 0) && typeof data.datalist == "object"){//如果结果集为空	
		if ($("RsCount")) {
			$("RsCount").innerText="0";
		}
		curr_row=null;
		BatAlert.closeTips();	
		BatAjax.removeAllRows(data.dispControl); 
		for(i = 0;i < pagesize;i++) {
			var tr=document.createElement("tr");
			var length = 0;
			if(data.chkField){
				length = data.showTxt.length+1;
			}else{
				length = data.showTxt.length;
			}
			for(j = 0;j < length;j++) {
				var td=document.createElement("td");
				td.align="center";
				if(data.chkField && j==0){
					td.innerHTML="<input type=\"checkbox\" id=\"tempCheck\" disabled=\"true\"/>";
				} else {
					td.innerHTML="&nbsp;&nbsp;";
				}
				tr.appendChild(td);
				if($("add")){
	   	  			//tr.ondblclick = $("add").onclick;	  
	   			}
			}
			$(data.dispControl).appendChild(tr);
		}
		return false;
	}
	if($("num")){
		if(data.pages){
			$("num").innerText =data.pages.maxRecord;
		}else{
			$("num").innerText = data.datalist.length;
		}
	}
	var array =data.datalist;
	
	var arr_hidden=data.hiddentxt;
	var mailList=new Array();	
	
	if(data.chkField){
		mailList[mailList.length]= eval("getChkKayVal()");
	}	
	mailList=dispTableGetList(array,data.showTxt,arr_hidden,mailList);

	if(data.taxis.taxisField!=""){
		mailList[mailList.length]=dispTableTaxis(array,data.taxis);		
	}

	var optAdd = {};   
    optAdd.rowCreator = function(){
		var tr = document.createElement("tr");
		tr.onclick = function(){
		 	rowOnClick(this);
		 	if($("rowclick")) {
		 		$("rowclick").value="yes";
		 	}
		  	singleclick();//Page maybe change single click,event,rewrite this function
		  	if($("editSection")) {
		  		$("editSection").value="yes";
		  	}
	   	};
	   	if(data.ondblclick!=""){
		   	tr.ondblclick =function (){
		   		eval(data.ondblclick);   	  		
		   	}
	   	} else if($("edit") && !$("editLxjd") && !$("editLxtj")){
	   	  	tr.ondblclick = $("edit").onclick;	  
	   	}
	   	return tr;
	};		
	BatAjax.removeAllRows(data.dispControl); 
	curr_row=null;		
	if(data.showHtml.length==0){//没有HTML列 默认
		BatAjax.addRowsTwo(data.dispControl,array,mailList,optAdd);
	} else {
		//增加参数 显示的列，全部列，是否有多选框
		var newalllist=new Array();
		for(f=0;f<data.hiddentxt.length;f++) {
			newalllist[newalllist.length]=data.hiddentxt[f];
		}
		for(f=0;f<data.showTxt.length;f++) {
			newalllist[newalllist.length]=data.showTxt[f];
		}
		BatAjax.addRowsHtml(data.dispControl,array,mailList,optAdd,data.showHtml,newalllist);
	}
	var offset = pagesize - data.datalist.length;
	if(offset > 0) {
		for(i = 0;i < offset;i++) {
			var tr=document.createElement("tr");
			var length = 0;
			if(data.chkField){
				length = data.showTxt.length + 1;
			}else{
				length = data.showTxt.length;
			}
			for(j = 0;j < length;j++) {
				var td=document.createElement("td");
				td.align="center";
				if(data.chkField && j==0){
					td.innerHTML="<input type=\"checkbox\" id=\"tempCheck\" disabled=\"true\"/>";
				} else {
					td.innerHTML="&nbsp;&nbsp;";
				}
				tr.appendChild(td);
				if($("add")){
	   	  			//tr.ondblclick = $("add").onclick;	  
	   			}
			}
			$(data.dispControl).appendChild(tr);
		}
	}
	BatAlert.closeTips();	
	if(data.pages){
		initPage(data.pages);
	}

	if($("hzyobjValue")) {
		dispCheck($("hzyobjValue").value);
	}
	if($("setCheckStr")) {
		setDefaultCheck();
	}
}

function singleclick2(event){}//单击
function dispTableBean2(data){
	if ($("RsCount")&& data.pages) {
		$("RsCount").innerText = data.pages.maxRecord;
	}
	if(data.datalist.length == 0 && typeof data.datalist == "object"){//如果结果集为空	
		if ($("RsCount")) {
			$("RsCount").innerText="0";
		}
		curr_row=null;
		BatAlert.closeTips();	
		BatAjax.removeAllRows(data.dispControl); 
		var tr=document.createElement("tr");
		var td=document.createElement("td");
		if(data.chkField){
			td.colSpan=data.showTxt.length+1;
		}else{
			td.colSpan=data.showTxt.length;
		}
		
		td.align="center";
		td.innerText="暂无数据！";
		tr.appendChild(td);
		$(data.dispControl).appendChild(tr);
		return false;
	}
	if($("num")){
		if(data.pages){
			$("num").innerText =data.pages.maxRecord;
		}else{
			$("num").innerText = data.datalist.length;
		}
	}
	var array =data.datalist;
	
	var arr_hidden=data.hiddentxt;
	var mailList=new Array();	
	if(data.chkField){
			mailList[mailList.length]= eval("getChkKayVal()");
		}	
	 mailList=dispTableGetList(array,data.showTxt,arr_hidden,mailList);

	if(data.taxis.taxisField!=""){
		mailList[mailList.length]=dispTableTaxis(array,data.taxis);		
	}

	var optAdd = {};   
      optAdd.rowCreator = function(){
	  var tr = document.createElement("tr");
	  tr.onclick = function(){
 	rowOnClick(this,event);
  	singleclick2(event);//Page maybe change single click,event,rewrite this function
   	  };
   	  
   	  if(data.ondblclick!=""){
   	  tr.ondblclick =function (){
   	  		eval(data.ondblclick);   	  		
   	  	}
   	  }else if($("edit")){
   	  	tr.ondblclick = $("edit").onclick;	  
   	  }
   	  
	  return tr;
	};		
	BatAjax.removeAllRows(data.dispControl); 
	curr_row=null;
	BatAjax.addRows(data.dispControl,array,mailList,optAdd);
	BatAlert.closeTips();	


	if(data.pages){
		initPage(data.pages);
	}
}
function dispTableBeanCheckBox(data){
	var pagesize = data.pages.pageSize;
	if(data.datalist.length == 0 && typeof data.datalist == "object"){		
		curr_row=null;
		BatAlert.closeTips();	
		BatAjax.removeAllRows(data.dispControl); 
		for(i = 0;i < pagesize;i++) {
			var tr=document.createElement("tr");
			var length = 0;
			if(data.chkField){
				length = data.showTxt.length+2;
			}else{
				length = data.showTxt.length+1;
			}
			for(j = 0;j < length;j++) {
				var td=document.createElement("td");
				td.align="center";
				td.innerText=" ";
				tr.appendChild(td);
				if($("add")){
	   	  			//tr.ondblclick = $("add").onclick;	  
	   			}
			}
			$(data.dispControl).appendChild(tr);
		}
		return false;
	}
	if($("num")){
		if(data.pages){
			$("num").innerText =data.pages.maxRecord;
		}else{
			$("num").innerText = data.datalist.length;
		}
	}
	var array =data.datalist;
	var txt_check=data.checktxt;
	var mailList=new Array();	
	mailList=dispTableGetListChk(array,data.showTxt,txt_check,mailList);
	if(data.taxis.taxisField!=""){
		mailList[mailList.length]=dispTableTaxis(array,data.taxis);		
	}

	var optAdd = {};   
    optAdd.rowCreator = function(){
	 var tr = document.createElement("tr");
	  tr.onclick = function(){
 		rowOnClick(this);
   	  };
   	  if(data.ondblclick!=""){
		   	tr.ondblclick =function (){
		   		eval(data.ondblclick);   	  		
		   	}
	   	} else if($("edit")){
	   	  	tr.ondblclick = $("edit").onclick;	  
	   	}
   	  return tr;
	};		
	BatAjax.removeAllRows(data.dispControl); 
	curr_row=null;
	BatAjax.addRows(data.dispControl,array,mailList,optAdd);
	var offset = pagesize - data.datalist.length;
	if(offset > 0) {
		for(i = 0;i < offset;i++) {
			var tr=document.createElement("tr");
			var length = 0;
			if(data.chkField){
				length = data.showTxt.length+2;
			}else{
				length = data.showTxt.length+1;
			}
			for(j = 0;j < length;j++) {
				var td=document.createElement("td");
				td.align="center";
				td.innerText=" ";
				tr.appendChild(td);
				if($("add")){
	   	  			//tr.ondblclick = $("add").onclick;	  
	   			}
			}
			$(data.dispControl).appendChild(tr);
		}
	}
	BatAlert.closeTips();	
	if(data.pages){
		initPage(data.pages);
	}
}
/********按住shift键多选***********/
var isShift=false;
var checkIndex=0;
var previousIndex=null;
window.document.onkeydown=function(){
		if(event.keyCode==16)
		isShift=true;
}
window.document.onkeyup=function(){
		isShift=false;
}
function selectMore(nowsIndex)
{
    if(!isShift)
    return;
    
    if(previousIndex==null)
    return;
    
    var startindex=0;
    var endindex=0;
    if(nowsIndex==previousIndex)
       return;
    if(nowsIndex>previousIndex)
    {
    endindex=nowsIndex;
    startindex=previousIndex;
    }
    if(nowsIndex<previousIndex)
    {
         endindex=previousIndex;
         startindex=nowsIndex;
    }
    for(findex=startindex;findex<endindex;findex++)
    {
      $("ID"+findex).checked=true;
    }
    previousIndex=null;
}
/*
 *
 *多选
 */
function getChkKayVal(){
    return function(array) {
    		var span=document.createElement("span");    			
			var hiddenid = document.createElement("input");
			hiddenid.type = "checkbox";
			hiddenid.name = "checkname";
			hiddenid.value = array.ID;
			if($("checkBoxStatus")) {
				if($("checkBoxStatus").value=="no") {
					hiddenid.disabled="true";
				}
			}
			//////////////////////////////////////设置顺序-shift
			hiddenid.sIndex=checkIndex;
			hiddenid.id="ID"+checkIndex;
			checkIndex++;
			//////////////////////////////////////
		    hiddenid.onclick=function(){      
		      if(hiddenid.checked==true)
		      {
		       hiddenid.checked=false;
		      }else
		      {
		       hiddenid.checked=true;
		      }
		      
		       //////////////////////////////////////设置顺序-shift
		       selectMore(hiddenid.sIndex);//判断是
		       previousIndex=hiddenid.sIndex;//保存当前点击的 
		       //////////////////////////////////////
		    }
			
			span.appendChild(hiddenid);  		
    	return span;};
}	

function dispTableGetList(array,txt,arr_hidden,mailList){
	var i=0;
	for(j=0; j<txt.length; j++){
	 if(arr_hidden.length>i&&arr_hidden[i]!=""){
			mailList[mailList.length]= eval("getHiddenKayVal('array." + txt[j] + "','array." + arr_hidden[i] + "')");
			i++;
		}else{
			mailList[mailList.length] = eval("getKeyVal('array." + txt[j] + "')");
		}   
    } 
    return mailList;    
}
function dispTableGetListChk(array,txt,txt_check,mailList) {
	var i=0;
	for(j=0; j<txt.length; j++){
	 if(txt_check.length>i&&txt_check[i]!=""){
			mailList[mailList.length]= eval("getChkboxKeyVal('array." + txt_check[i] + "')");
			i++;
		}
	    mailList[mailList.length] = eval("getKeyVal('array." + txt[j] + "')");
    } 
    return mailList;   
}
function dispTableTaxis(array,taxis){
	 return function(array) {
	 	var currentNumber=eval("array."+taxis.taxisField);
    			var span=document.createElement("span");
    			span.style.cssText = "cursor:hand";
    		if(1==parseInt(currentNumber)){				
					span.innerHTML="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
					var img=document.createElement("A");
					img.href="#";
					img.innerHTML="<img src='style/base/down.gif' border='0' align=absmiddle />";
					img.onclick=function(){
								down(this.parentNode.parentNode.parentNode);
						};
					span.appendChild(img);					
			}else if(taxis.totalNumber==parseInt(currentNumber)){
					span.innerHTML="&nbsp;";
					var img=document.createElement("A");
					img.href="#";
					img.innerHTML="<img src='style/base/up.gif' border='0' align=absmiddle />";
					img.onclick=function(){
							up(this.parentNode.parentNode.parentNode);
					};
					span.appendChild(img);
			}else{
					span.innerHTML="&nbsp;";
					var  img=document.createElement("A");
					img.href="#";
					img.innerHTML="<img src='style/base/up.gif' border='0' align=absmiddle />";
					img.onclick=function(){
						up(this.parentNode.parentNode.parentNode);
					};
					span.appendChild(img);
					var img=document.createElement("A");
					img.innerHTML="&nbsp;&nbsp;";
					span.appendChild(img);
					img=document.createElement("A");
					img.href="#";
					img.innerHTML="<img src='style/base/down.gif' border='0' align=absmiddle />";
					img.onclick=function(){
						down(this.parentNode.parentNode.parentNode);
					};
					span.appendChild(img);
			}
			return span;
			};
}


function initPage(page){
	if($("pagediv")&&page.maxPage>1){
			$("pagesize").innerText=page.pageSize;
			$("currentpage").innerText=page.currentPage;
			$("maxpage").innerText=page.maxPage;		
			$("maxrecord").innerText=page.maxRecord;
			$("pagelist").innerHTML="";
			for (var I in page.pagelist) {			   
			    var A=document.createElement("A");
			    A.innerText=page.pagelist[I];
			    A.href="javascript:submitPage('"+page.pagelist[I]+"')"	
			     if(page.pagelist[I]==page.currentPage){
			    	A.className="current";			    	
			    }				    		  
			    $("pagelist").appendChild(A);
 			 }
		} else {
			$("pagesize").innerText=page.pageSize;
			$("currentpage").innerText=page.currentPage;
			$("maxpage").innerText=page.maxPage;		
			$("maxrecord").innerText=page.maxRecord;
			$("pagelist").innerHTML="";
		}
}

function dispTableListWithoutdb(data){
	if(data[1] == null && typeof data[1] == 'object'){
		BatAjax.removeAllOptions(data[0]);
		return false;
	}
	if($("num")){
		$("num").innerText = data[1].length;	
	}
		
	var optAdd = {};
	var array = new Array();
    array = data[1];	
    txt=data[2];
	var mailList = new Array();  
	for(j=0; j<txt.length; j++){
      mailList[j] = eval("getKeyVal('array." + txt[j] + "')");
    }   
    optAdd.rowCreator = function(){
	  var tr = document.createElement("tr");
	  tr.onclick = function(){
	  	rowOnClick(this);
   	  };
	  return tr;
	};		
	BatAjax.removeAllRows(data[0]); 
	curr_row=null;
	BatAjax.addRows(data[0],array,mailList,optAdd);
	BatAlert.closeTips();	
}
var temptimebyautclose=null;;
function doClose(time){
	$("close").innerText=time;	
	if(time!=0){
	 	temptimebyautclose=window.setTimeout("doClose("+(time-1)+")", 1000);	
	}else{
		temptimebyautclose=null;
		if($("preAction") && $("preAction").value!=null &&$("preAction").value!=""){
			document.forms[0].action=$("preAction").value;
			document.forms[0].submit();
		}
		Close();
	}
}	

function doreturn(time,newhref){
	$("close").innerText=time;	
	if(time!=0){
	 	window.setTimeout("doreturn("+(time-1)+",'"+newhref+"')", 1000);	
	}else{
		window.location.href=newhref;
	}
}	
//close windows
function doreturnbyclose(time,newhref){
	$("close").innerText=time;
	if(time!=0){
	 	window.setTimeout("doreturnbyclose("+(time-1)+",'"+newhref+"')", 1000);	
	}else{
	
       window.close();
//		window.location.href=newhref;
	}
}	
function doreturnnourl(time) {
   $("close").innerText=time;	
   if(time!=0){
	 	window.setTimeout("doreturnnourl("+(time-1)+")",1000);	
   } else {
		autoback();
   }
}
function dispDelInfoComman(str) {
	if(str === "true") {
	} else if(str === "false") {
		alert("删除失败！");
	}
	refurbish();
}
/**定义公用类（方法）:强制改变窗口*/
function ForceWindow(sTarget) {
	if (sTarget == null) {
		sTarget = "mainFrame";
	}
	this.r = document.documentElement;
	this.f = document.createElement("FORM");
	this.f.target = sTarget;
	this.f.method = "post";
	this.r.insertBefore(this.f, this.r.childNodes[0]);
}

function inArray(str, array) {//
	for (tmp = 0; tmp <array.length; tmp++) {
		if (str == array[tmp]) {
			return true;
		}
	}
	return false;
}


function setCookie(name, value) {
	var today = new Date()
	var expires = new Date()
	expires.setTime(today.getTime() + 1000*60*60*24*365)
	document.cookie = name + "=" + escape(value)	+ "; expires=" + expires.toGMTString()
}

function getCookie(Name) {
   var search = Name + "="
   if(document.cookie.length > 0) {
      offset = document.cookie.indexOf(search)
      if(offset != -1) {
         offset += search.length
         end = document.cookie.indexOf(";", offset)
         if(end == -1) end = document.cookie.length
         return unescape(document.cookie.substring(offset, end))
      }
      else return ""
   }
}

function checkNumber(value) {
	//var str = ["0","1","2","3","4","5","6","7","8","9","0"];
	var str="0123456789";
	for(i=0;i < value.length;i++) {
		if(str.indexOf(value.substring(i,i+1)) == "-1")
			break;
	}
	if(i < value.length)
		return false;
	else
		return true;
}


function correctPNG() 
{ 
for(var i=0; i<document.images.length; i++) 
{ 
var img = document.images[i] 
var imgName = img.src.toUpperCase() 
if (imgName.substring(imgName.length-3, imgName.length) == "PNG") 
{ 
var imgID = (img.id) ? "id='" + img.id + "' " : "" 
var imgClass = (img.className) ? "class='" + img.className + "' " : "" 
var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' " 
var imgStyle = "display:inline-block;" + img.style.cssText 
if (img.align == "left") imgStyle = "float:left;" + imgStyle 
if (img.align == "right") imgStyle = "float:right;" + imgStyle 
if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle 
var strNewHTML = "<span " + imgID + imgClass + imgTitle 
+ " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";" 
+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader" 
+ "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
img.outerHTML = strNewHTML 
i = i-1 
} 
} 
} 
//get selected checkbok value,return string like 12123,45487,12142
function getCheckValue(){
	var str="";
     		for(i =0;i < document.getElementsByTagName("input").length;i++){ 
     		    if(document.getElementsByTagName("input")[i].type == "checkbox"){
					if(document.getElementsByTagName("input")[i].checked==true&&document.getElementsByTagName("input")[i].name=='checkname'){
						if(str==""){
						    str=document.getElementsByTagName("input")[i].value; 
						}else{
							str=str+","+document.getElementsByTagName("input")[i].value;
						}   
					}
				}
			}
	return str;
}

function getCheckValueStr(){
	var str="";
     		for(i =0;i < document.getElementsByTagName("input").length;i++){ 
     		    if(document.getElementsByTagName("input")[i].type == "checkbox"){
					if(document.getElementsByTagName("input")[i].checked==true&&document.getElementsByTagName("input")[i].name=='checkname'){
						if(str==""){
						    str="'"+ document.getElementsByTagName("input")[i].value+"'"; 
						}else{
							str=str+",'"+document.getElementsByTagName("input")[i].value+"'";
						}   
					}
				}
			}
	return str;
}

//选中全部 或取消全部
function selectAllOrCancel(thiss){

if(thiss.checked)//如果选中
{
     		for(i =0;i < document.getElementsByTagName("input").length;i++){
     				if(document.getElementsByTagName("input")[i].type == "checkbox"){
						if(document.getElementsByTagName("input")[i].name=='checkname')
						{
				document.getElementsByTagName("input")[i].checked=true;
						}
					}
				}
}else
{
     		for(i =0;i < document.getElementsByTagName("input").length;i++){
     				if(document.getElementsByTagName("input")[i].type == "checkbox"){
						if(document.getElementsByTagName("input")[i].name=='checkname')
						{
				document.getElementsByTagName("input")[i].checked=false;
						}
					}
				}
}
}
function Alert(msg,tit){
	if(tit==""||tit==null){
		tit="提示";
	}    
  	parent.Ext.MessageBox.alert(tit,msg);   
}

function showDiv(event,id) {
	  if($(id).getAttribute("left")!=null&$(id).getAttribute("top")!=null) {
	     $(id).style.top=(event.y-parseInt($(id).clientHeight));
	     $(id).style.left=(event.x-parseInt($(id).clientWidth));
	     return;
	  } else if($(id).getAttribute("top")!=null)  {
	  	 $(id).style.top=(event.y-parseInt($(id).clientHeight));
		 $(id).style.left=event.x;
		 return;
	  } else if($(id).getAttribute("left")!=null) {
	   	 $(id).style.top=event.y;
		 $(id).style.left=(event.x-parseInt($(id).clientWidth));
		 return;
	  } else {
		 $(id).style.top=event.y;
		 $(id).style.left=event.x;
		 return;
	  }
}

function rightMClick(event,id) {
	if(event.button=='2') {
		$(id).style.top=event.y;
		$(id).style.left=event.x;
		$(id).style.display="";
	}
}
function setValue(objId,value) {
	if($(objId)) {
		$(objId).value = value;
	}
}
function setObjShowOrHidden(objId,way) {
	if($(objId)) {
		$(objId).style.display = way;
	}
}
String.prototype.contains = function(str){
	return this.indexOf(str) > -1;
} 
String.prototype.replaceAll=function(oldChar, newChar){
	var str = this;
	while(str.indexOf(oldChar) != -1){
		str = str.replace(oldChar, newChar);
	}
	return str;	
}
function setNullData(pagesize,listsize,length,objId) {
	var offset = pagesize - listsize;
		if(offset > 0) {
			for(i = 0;i < offset;i++) {
				var tr=document.createElement("tr");
				for(j = 0;j < length;j++) {
					var td=document.createElement("td");
					td.align="center";
					td.innerHTML="&nbsp;&nbsp;";
					tr.appendChild(td);
					if($("add")){
		   	  			tr.ondblclick = $("add").onclick;	  
		   			}
				}
				$(objId).appendChild(tr);
			}
		}
}

function setNullData2(pagesize,listsize,length,objId) {
	var offset = pagesize - listsize;
		if(offset > 0) {
			for(i = 0;i < offset;i++) {
				var tr=document.createElement("tr");
				for(j = 0;j < length;j++) {
					var td=document.createElement("td");
					td.align="center";
					td.innerHTML="&nbsp;&nbsp;";
					tr.appendChild(td);
				}
				$(objId).appendChild(tr);
			}
		}
}

function setNullDataCheckBox(pagesize,listsize,length,objId) {
	var offset = pagesize - listsize;
		if(offset > 0) {
			for(i = 0;i < offset;i++) {
				var tr=document.createElement("tr");
				for(j = 0;j < length;j++) {
					var td=document.createElement("td");
					if(j == 0) {
						td.align="center";
						td.innerHTML="<input type=\"checkbox\" disabled=\"true\"/>";
					} else {
						td.align="center";
						td.innerHTML="&nbsp;&nbsp;";
					}
					tr.appendChild(td);
				}
				$(objId).appendChild(tr);
			}
		}
}




function checkLength(objId,maxLength) {
	if($(objId).value=="") {
		return false;
	} else {
		var mc = $(objId).value;
		if(mc.length > maxLength) {
			return false;
		}
	}
}

function openSelectJcsj(sslx,kjid,kjmcid) {
    var url="jcsjdyzb.do?theAction=chooseSelectJcsj&kjid="+kjid+"&kjmcid="+kjmcid+"&sslx="+sslx;
    var height="300";
    var scrolling="no";
    tipsWindown("业务对象","id:text","620","300","true","","true","id",url,height,scrolling);
	//showTopWin("jcsjdyzb.do?theAction=chooseSelectJcsj&kjid="+kjid+"&kjmcid="+kjmcid+"&sslx="+sslx,400,600,"Y");
}
String.prototype.Trim = function() {  
	var m = this.match(/^\s*(\S+(\s+\S+)*)\s*$/);  
	return (m == null) ? "" : m[1];  
}
/**
 * 检测手机号码
 * @return
 */
String.prototype.isMobile = function() {  
	return (/^(?:13\d|15[89])-?\d{5}(\d{3}|\*{3})$/.test(this.Trim()));  
} 
/*
 * 检测电话号码
 */
String.prototype.isTel = function()
{
    //"兼容格式: 国家代码(2到3位)-区号(2到3位)-电话号码(7到8位)-分机号(3位)"
    return (/^(([0\+]\d{2,3}-)?(0\d{2,3})-)(\d{7,8})(-(\d{3,}))?$/.test(this.Trim()));
}
function checkTel(obj){
	  var s_reg = "[^ ]";
	  if($(obj).value.match(s_reg)==null){
	    alert("提醒：请输入正确的手机号码或电话号码\n\n例如:13916752109或023-86526333");
	    $(obj).focus();
	   return false;
	  }
	        if ($(obj).value.isMobile()||$(obj).value.isTel())  {  
	        	$(obj).value = $(obj).value.Trim();            
	            return true;  
	        } 
	        else {  
	            alert("提醒：请输入正确的手机号码或电话号码\n\n例如:13916752109或023-86526333"); 
	            $(obj).focus();
	            return false;        
	        }
	} 
function checkMobile(obj) {
	var s_reg = "[^ ]";
	  if($(obj).value.match(s_reg)==null){
	    alert("提醒：请输入正确的手机号码\n\n例如:13916752109");
	    $(obj).focus();
	    return false;
	  }
	  if ($(obj).value.isMobile())  {  
	       $(obj).value = $(obj).value.Trim();            
	       return true;  
	  } else {  
	       alert("提醒：请输入正确的手机号码\n\n例如:13916752109"); 
	       $(obj).focus();
	       return false;        
	  }
}
//判断输入密码的类型 
function CharMode(iN){ 
	if (iN>=48 && iN <=57) //数字 
	return 1; 
	if (iN>=65 && iN <=90) //大写 
	return 2; 
	if (iN>=97 && iN <=122) //小写 
	return 4; 
	else 
	return 8;   
} 
//bitTotal函数 
//计算密码模式 
function bitTotal(num){ 
	modes=0; 
	for (i=0;i<4;i++){ 
	if (num & 1) modes++; 
	num>>>=1; 
	} 
	return modes; 
} 
//返回强度级别 
function checkStrong(sPW){ 
	if (sPW.length<=4) 
	return 0; //密码太短 
	Modes=0; 
	for (i=0;i<sPW.length;i++){ 
	//密码模式 
	Modes|=CharMode(sPW.charCodeAt(i)); 
	} 
	return bitTotal(Modes); 
} 
/**
 * 自动匹配下拉选择框 参数一 value对应控件id name对应的空间id 默认显示的提示信息 
 * ConferenceAjax.getPersonList("conference.registerid","conference.registername","请选择...",displayCombo);
 */
 
 function setSearchKeyParam(split){
 		var str = document.getElementById("searchKey").value;
 		if(split == null){
			split = "-"; 			
 		}
 		if(str == ""){
 			return "";
 		}
 		var strArr = str.split(split);
 		var res = "";
 		for(var i=0;i<strArr.length;i++){
 			res += "&"+strArr[i]+"="+document.getElementById(strArr[i]).value;
 		}
 		res += "&searchKey="+document.getElementById("searchKey").value	;
 		if(document.getElementById("currentpage") && document.getElementById("currentpage").tagName.toLowerCase() == 'span'){
 			res += "&currentpage="+document.getElementById("currentpage").innerHTML;
 		}else if(document.getElementById("currentpage") && document.getElementById("currentpage").tagName.toLowerCase() == 'input'){
 			res += "&currentpage="+document.getElementById("currentpage").value;
 		}
 		return res;
 }
 
 
//window.attachEvent("onload", correctPNG);



//firefox and ie
//zhoujiawei
function dispTableBeanFI(data){
   //window.alert("a1");
	if(data.datalist != null && data.datalist.length > 0) {
		initPageFI(data.pages);
	} else {
		//$("maxrecord").innerText="0";
		document.getElementById("maxrecord").innerHTML="0";
		document.getElementById("maxpage").innerHTML="1";
		 
	}
	//window.alert("a2");
	
	if (document.getElementById("RsCount")&& data.pages) {
		document.getElementById("RsCount").innerHTML = data.pages.maxRecord;
	}
	//window.alert("a3");
	var pagesize = data.pages.pageSize;
	
	if((data.datalist == null || data.datalist.length == 0) && typeof data.datalist != "object"){//如果结果集为空	
		
		if (document.getElementById("RsCount")) {
			document.getElementById("RsCount").innerHTML="0";
		}
		curr_row=null;
		BatAlert.closeTips();	
		BatAjax.removeAllRowsFI(data.dispControl); 
		
		for(i = 0;i < pagesize;i++) {
			var tr=document.createElement("tr");
			var length = 0;
			if(data.chkField){
				length = data.showTxt.length+1;
			}else{
				length = data.showTxt.length;
			}
			for(j = 0;j < length;j++) {
				var td=document.createElement("td");
				td.align="center";
				if(data.chkField && j==0){
					td.innerHTML="<input type=\"checkbox\" id=\"tempCheck\" disabled=\"true\"/>";
				} else {
					td.innerHTML="&nbsp;&nbsp;";
				}
				tr.appendChild(td);
				if($("add")){
	   	  			//tr.ondblclick = $("add").onclick;	  
	   			}
			}
			document.getElementById(data.dispControl).appendChild(tr);
		}
		return false;
	}
	//window.alert("a5");
	if(document.getElementById("num")){
		if(data.pages){
			document.getElementById("num").innerHTML =data.pages.maxRecord;
			
		}else{
			document.getElementById("num").innerHTML = data.datalist.length;
		}
	}
	var array =data.datalist;
	
	var arr_hidden=data.hiddentxt;
	var mailList=new Array();	
	
	if(data.chkField){
		mailList[mailList.length]= eval("getChkKayVal()");
	}	
	//window.alert("a6");
	mailList=dispTableGetList(array,data.showTxt,arr_hidden,mailList);
    
	if(data.taxis.taxisField!=""){
		mailList[mailList.length]=dispTableTaxis(array,data.taxis);		
	}
   
	var optAdd = {};   
    optAdd.rowCreator = function(){
		var tr = document.createElement("tr");
		tr.onclick = function(){
		 	rowOnClick(this);
		 	if(document.getElementById("rowclick")) {
		 		document.getElementById("rowclick").value="yes";
		 	}
		  	singleclick();//Page maybe change single click,event,rewrite this function
		  	if(document.getElementById("editSection")) {
		  		document.getElementById("editSection").value="yes";
		  	}
	   	};
	   
	   	if(data.ondblclick!=""){
	
		   	tr.ondblclick =function (){
		   		eval(data.ondblclick);   	  		
		   	}
	   	} else if($("edit") && !$("editLxjd") && !$("editLxtj")){
	   	  	tr.ondblclick = $("edit").onclick;	  
	   	}
	   	return tr;
	};	
		
	BatAjax.removeAllRowsFI(data.dispControl); 
	curr_row=null;		
	if(data.showHtml.length==0){//没有HTML列 默认
	
		BatAjax.addRowsFI(data.dispControl,array,mailList,optAdd);
	} else {
	
		//增加参数 显示的列，全部列，是否有多选框
		var newalllist=new Array();
		for(f=0;f<data.hiddentxt.length;f++) {
			newalllist[newalllist.length]=data.hiddentxt[f];
		}
		for(f=0;f<data.showTxt.length;f++) {
			newalllist[newalllist.length]=data.showTxt[f];
		}
		
		BatAjax.addRowsHtmlFI(data.dispControl,array,mailList,optAdd,data.showHtml,newalllist);
	}
	var offset = pagesize - data.datalist.length;
	//window.alert("a7");
	if(offset > 0) {
		for(i = 0;i < offset;i++) {
			var tr=document.createElement("tr");
			var length = 0;
			if(data.chkField){
				length = data.showTxt.length + 1;
			}else{
				length = data.showTxt.length;
			}
			for(j = 0;j < length;j++) {
				var td=document.createElement("td");
				td.align="center";
				if(data.chkField && j==0){
					td.innerHTML="<input type=\"checkbox\" id=\"tempCheck\" disabled=\"true\"/>";
				} else {
					td.innerHTML="&nbsp;&nbsp;";
				}
				tr.appendChild(td);
				if($("add")){
	   	  			//tr.ondblclick = $("add").onclick;	  
	   			}
			}
			document.getElementById(data.dispControl).appendChild(tr);
		}
	}
	BatAlert.closeTips();	
	if(data.pages){
		initPageFI(data.pages);
	}

	if(document.getElementById("hzyobjValue")) {
		dispCheck(document.getElementById("hzyobjValue").value);
	}
	if(document.getElementById("setCheckStr")) {
		setDefaultCheck();
	}
}


function initPageFI(page){
	if(document.getElementById("pagediv")&&page.maxPage>1){
			document.getElementById("pagesize").innerHTML=page.pageSize;
			document.getElementById("currentpage").innerHTML=page.currentPage;
			document.getElementById("maxpage").innerHTML=page.maxPage;
				
			document.getElementById("maxrecord").innerHTML=page.maxRecord;
			
			document.getElementById("pagelist").innerHTML="";
			for (var I in page.pagelist) {			   
			    var A=document.createElement("A");
			    A.innerText=page.pagelist[I];
			    A.href="javascript:submitPage('"+page.pagelist[I]+"')"	
			     if(page.pagelist[I]==page.currentPage){
			    	A.className="current";			    	
			    }				    		  
			    document.getElementById("pagelist").appendChild(A);
 			 }
		} else {
			document.getElementById("pagesize").innerHTML=page.pageSize;
			document.getElementById("currentpage").innerHTML=page.currentPage;
			document.getElementById("maxpage").innerHTML=page.maxPage;		
			document.getElementById("maxrecord").innerHTML=page.maxRecord;
			document.getElementById("pagelist").innerHTML="";
		}
}


function setValueFI(objId,value) {
	if(document.getElementById(objId)) {
		document.getElementById(objId).value = value;
	}
}